Skip to content

Instantly share code, notes, and snippets.

@magnetikonline
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save magnetikonline/6fc28bc55b31482778ea to your computer and use it in GitHub Desktop.
Save magnetikonline/6fc28bc55b31482778ea to your computer and use it in GitHub Desktop.
AWS s3curl.pl example.

AWS s3curl.pl example usage

Perl wrapper script for curl from Amazon to GET/PUT items to/from S3 buckets, adding the required headers to the curl command line.

Download: http://aws.amazon.com/code/128

Listing a bucket

$ chmod u+x s3curl.pl
$ ./s3curl.pl \
	--id [AWS_KEY] \
	--key [AWS_KEY_SECRET] \
	https://s3.amazonaws.com/[BUCKET_NAME]

Using IAM roles

Nice little hack here - passing the required x-amz-security-token HTTP header.

http://www.dowdandassociates.com/blog/content/howto-use-s3curl-dot-pl-with-iam-roles/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment