s3-bash

2009 August 10
tags: ec2
by Josh Hand

I've started using s3-bash in a few of my ec2 scripts. It took me a little while to work out the exact syntax so I thought I'd share:

> Get bucket listing:

s3-get -k {accesskey} -s /{path}/{secretid} /{bucketname}

> Get file from bucket:

s3-get -k {accesskey} -s /{path}/{secretid} /{bucketname}/{filename} > {filename}

> Upload file to bucket:

s3-put -k {accesskey} -s /{path}/{secretid} -T /{path}/{filename} /{bucketname}/{filename}

> Delete from bucket:

s3-delete -k {accesskey} -s /{path}/{secretid} /{bucketname}/{filename}

 

Legend:
{accesskey} = AWS Access Key Id
{secretid} = AWS Secret Access Key Id File
{bucketname} = testjosh
{filename} = index.cfm
{path} = folder

2 Responses leave one →
  1. Mike_Essay
    Feb 2, 2010 at 6:53 AM

    Not big, but very useful script

  1. shara
    Feb 24, 2010 at 3:45 AM

    thanks for this

Leave a Reply