Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to associate public ip address in ec2 run-instance #479

Closed
bluskool opened this issue Nov 9, 2013 · 4 comments · Fixed by #483
Closed

Option to associate public ip address in ec2 run-instance #479

bluskool opened this issue Nov 9, 2013 · 4 comments · Fixed by #483
Assignees

Comments

@bluskool
Copy link

bluskool commented Nov 9, 2013

There doesn't seem to be any way to associate a public ip address without also adding a network interface with the --network-interfaces parameter. Is it possible for this to be a top level parameter?

@ghost ghost assigned garnaat Nov 9, 2013
@garnaat
Copy link
Contributor

garnaat commented Nov 9, 2013

Yes, I agree that would be useful.

jamesls added a commit that referenced this issue Nov 13, 2013
* release-1.2.5:
  Bumping version to 1.2.5
  Update completer unit tests with new changes
  Update CHANGELOG with latest features
  Add high level operations for cloudtrail
  Add a --associate-public-ip-address boolean option.  Fixes #479.
  Remove debugging code used in BaseAWSCommandParamsTest
  Add a new s3 website command
  Remove unused variables
  Remove trailing whitespace
@bluskool
Copy link
Author

Thanks for adding it! I tried it out, but I ran into a problem. It seems that I can't run --associate-public-ip-address and specify a subnet id for some reason.

$ aws ec2 run-instances --image-id ami-xxxxxxxx --count 1 --instance-type m1.medium --security-group-ids "sg-xxxxxxxx" "sg-xxxxxxxx" "sg-xxxxxxxx" --subnet-id subnet-xxxxxxxx --associate-public-ip-address
A client error (InvalidParameterCombination) occurred: Network interfaces and an instance-level subnet ID may not be specified on the same request

@ryuzee
Copy link

ryuzee commented Nov 18, 2013

Thanks for adding this feature but I got this error too. the command is as follows.

aws ec2 run-instances --output text --debug
--region ap-northeast-1
--image-id ami-b1fe9bb0
--key-name keypair1
--security-group-ids sg-xxxxxxx
--instance-type t1.micro
--subnet-id subnet-xxxxxxxx
--private-ip-address 10.0.0.222
--associate-public-ip-address
--count 1

and the error message is ...

A client error (InvalidParameterCombination) occurred: Network interfaces and an instance-level subnet ID may not be specified on the same request

any comments would be appreciated.

@JPalmerGithub
Copy link

Check this kind page out
http://drewblas.com/2012/08/24/aws-vpc-error-client-invalidparametercombination/
As he states as below:

Luckily, my company has premium AWS support and a quick 10 minute chat got the answer I needed. You must use the --network-attachment param, which takes the place of --group, --private-ip-address, and --subnet

The resulting command looks like this:

ec2-run-instances ami-abc123
--network-attachment :0:subnet-abc123::10.0.1.10:sg-abc123::
.... your other params

Good luck, I hope this helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants