Skip to content

Allow binary to be sent to user data - #416

Merged
kyleknap merged 2 commits into
boto:developfrom
kyleknap:user-data
Dec 19, 2014
Merged

kyleknap merged 2 commits into
boto:developfrom
kyleknap:user-data

Conversation

@kyleknap

Copy link
Copy Markdown
Contributor

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.
Comment thread tests/unit/test_ec2_operations.py Outdated

Copy link
Copy Markdown
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
Copy Markdown
Contributor 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

jamesls commented Dec 19, 2014

Copy link
Copy Markdown
Member

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

jamesls commented Dec 19, 2014

Copy link
Copy Markdown
Member

: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.

2 participants