Last active
September 22, 2020 22:32
-
-
Save Shogan/bea8b5dcf7f1019f4e3ada8d29378615 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
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