Skip to content

Instantly share code, notes, and snippets.

@Shogan
Last active September 22, 2020 22:32
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 Shogan/bea8b5dcf7f1019f4e3ada8d29378615 to your computer and use it in GitHub Desktop.
Save Shogan/bea8b5dcf7f1019f4e3ada8d29378615 to your computer and use it in GitHub Desktop.
BUCKET=your-backup-bucket-name-here
REGION=eu-west-2
aws iam create-user --user-name velero
cat > velero-policy.json <<EOF
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:GetObject",
"s3:DeleteObject",
"s3:PutObject",
"s3:AbortMultipartUpload",
"s3:ListMultipartUploadParts"
],
"Resource": [
"arn:aws:s3:::${BUCKET}/*"
]
},
{
"Effect": "Allow",
"Action": [
"s3:ListBucket"
],
"Resource": [
"arn:aws:s3:::${BUCKET}"
]
}
]
}
EOF
aws iam put-user-policy --user-name velero --policy-name velero --policy-document file://velero-policy.json
aws iam create-access-key --user-name velero
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment