OSX: brew install s3cmd
Debian/Ubuntu: apt-get install s3cmd
Other: Download from http://s3tools.org/s3cmd
s3cmd --configure
npm install -g s3-cli
Note: can use s3cmd for this, but the commands may be slightly different
Access Key ID: AKIAXXXXXXXXXXXXMLSQ
Secret Access Key: W27ZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXQ3MG
ARN: arn:aws:s3:::omgttt.sscotth.io/*
Note: The ending /* refers to all keys or objects/files inside the bucket
Edit the Resource item to match your bucket
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Stmt1419003855000",
"Effect": "Allow",
"Action": [
"s3:ListAllMyBuckets"
],
"Resource": [
"*"
]
}
]
}
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Stmt1419003855000",
"Effect": "Allow",
"Action": [
"s3:DeleteObject",
"s3:PutObject",
"s3:GetObject",
"s3:PutObjectAcl"
],
"Resource": [
"arn:aws:s3:::omgttt.sscotth.io/*"
]
}
]
}
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Stmt1419005861000",
"Effect": "Allow",
"Action": [
"s3:GetBucketLocation",
"s3:ListBucket"
],
"Resource": [
"arn:aws:s3:::omgttt.sscotth.io"
]
}
]
}
s3-cli ls s3://omgttt.sscotth.io/
s3-cli del s3://omgttt.sscotth.io/404.html
s3-cli put 404.html s3://omgttt.sscotth.io/404.html
s3-cli sync --delete-removed -P . s3://omgttt.sscotth.io/
"deploy": "s3-cli sync --delete-removed -P . s3://omgttt.sscotth.io/"