0

I need to be able to startup AWS EC2 instances quickly from one of my AMI images and at launch run a script to bootstrap the instance. I know I can do this with user data but I need to be able to pass the script an argument that will be different each time the instance is started.

If I use Start-EC2Instance from AWS Tools I cant see a way to either pass the user data or pass agrs to the launch script.

Any help would be much appreciated.

Thanks

1 Answer 1

0

You are looking at the wrong command. Take a look at New-EC2Instance

Synopsis

Invokes the RunInstances method against Amazon Elastic Compute Cloud.
Syntax

New-EC2Instance
-ImageId <String>
....
-UserData <String>
-UserDataFile <String>
....
Description

Launches a specified number of instances of an AMI for which you have permissions.
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.