Create an EC2 instance without starting

I would like to create some EC2 instance, but before it starts to do some things, using the instance id generated for this instance. Is there an option in aws ec2 run-instancesor another command aws ec2to create an AW2 EC2 instance without starting it? A workaround will generate a UUID to label this instance and bind this UUID instead of the instance ID or stop immediately after starting the instance, but I would prefer a more reasonable solution.

+4
source share
2 answers

Since I talked about @ pt12lol in the comments, this is exactly what userdata is for .

Amazon:

Amazon EC2, , . Amazon EC2: shell- cloud-init. ( ) base64 ( API).

, , --user-data aws cli Userdata AWS.

+4

Source: https://habr.com/ru/post/1676887/


All Articles