Last active
February 8, 2017 15:47
-
-
Save ccabanero/2a2a97e63a1acb01056e to your computer and use it in GitHub Desktop.
AWS CLI: Sync files from workstation to s3 bucket
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Getting Started with AWS CLI (Command Line Interface) | |
1. Get your access key ID and secret access key | |
2. Check python (required 2.6.5+) | |
$ python --version | |
3. Download CLI via curl | |
$ mkdir AWSCLI | |
$ cd AWSCLI | |
$ curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip" | |
4. Unzip the package | |
$ unzip awscli-bundle.zip | |
5. Run the executable | |
$ aws | |
A symlink aws is created. So now, jsut use 'aws' in any directory | |
6. Test AWS CLI installation | |
$ aws help | |
7. Configure AWS CLI with your access key and secret access key | |
$ aws configure | |
AWS Access Key ID enter it e.g. ABST123... | |
AWS Secret Access Key enter it e.g. D0baowmd0wmdl... | |
Default region name - enter it e.g. us-west-1 | |
Default output format [RETURN] | |
Note, if you want to change any of the above, just run $ aws configure again and it will present your previous settings | |
8. Sync data on workstation to s3 bucket | |
$ cd to directory of files | |
$ aws s3 sync . s3://nameOfBucket | |
* note - you can use aws configure to set the default region to your s3 bucket - allowing you to use the bucket name without appending the region name to it | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment