Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Net::Amazon::EC2 loses pound-shebang when base64'd

by esh (Pilgrim)
on Oct 06, 2009 at 05:40 UTC ( [id://799385]=note: print w/replies, xml ) Need Help??


in reply to Net::Amazon::EC2 loses pound-shebang when base64'd

Try passing in the user-data script without base-64 encoding it. It works for me.

I happen to maintain the user-data script running software and the Amazon EC2 Debian AMI you are running. I suppose I could enhance it to try to base-64 decode the user-data if it wasn't in the clear, but I'm not sure that there is any good reason to do so.

Replies are listed 'Best First'.
Re^2: Net::Amazon::EC2 loses pound-shebang when base64'd
by esh (Pilgrim) on Oct 06, 2009 at 23:17 UTC
    I take back my comment about not base-64 encoding. I just looked at my code and it says:
    my $instances = $ec2->run_instances( ImageId => $ami_id, MinCount => 1, MaxCount => 1, KeyName => $key, (defined $user_data ? (UserData => MIME::Base64::encode_base64($user_data)) : ()), (defined $instance_type ? (InstanceType => $instance_type) : ()), #... ) or die "$ec2->{error}";

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://799385]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2024-03-29 08:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found