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

Allow binary to be sent to user data #416

Merged
merged 2 commits into from
Dec 19, 2014
Merged

Conversation

kyleknap
Copy link
Member

This is necessary because gzip files can be passed in as user data when
launching instances. Such as in this issue: aws/aws-cli#814

Before if you ran:

$ aws ec2 run-instances --image-id ami-b66ed3de --user-data fileb://myscript.gz

You would get decoding errors because it is assumed the input to --user-data is text.

Now with this PR the command will work with both text and binary. I tested it manually as well and both my gzip compressed script and text-based shell script ran when I launched my instances.

cc @jamesls @danielgtaylor

This is necessary because gzip files can be passed in as user data when
launching instances.
@@ -99,6 +99,20 @@ def test_run_instances_userdata(self):
# TODO: We need to base64 decode this! Needs a customization
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uh..just noticing this now. Can we uncomment this assertion and verify it works?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I will fix that. I just noticed nothing is asserted here as well. That is why I accidentally did not assert anything in the test I added. I had just modified this test.

@jamesls
Copy link
Member

jamesls commented Dec 19, 2014

Let's get the tests updated and then verify that the travis build is clean. Otherwise :shipit: and don't forget to update the CLI changelog.

@jamesls
Copy link
Member

jamesls commented Dec 19, 2014

:shipit:

kyleknap added a commit that referenced this pull request Dec 19, 2014
Allow binary to be sent to user data
@kyleknap kyleknap merged commit d5cd2c0 into boto:develop Dec 19, 2014
@kyleknap kyleknap deleted the user-data branch December 19, 2014 20:50
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 this pull request may close these issues.

None yet

2 participants