Last active
October 3, 2024 12:11
-
-
Save poly4concept/ff7007b95ac7067f53af6cf552ad8d2a to your computer and use it in GitHub Desktop.
IAM policy for all the access and permission require to do a frontend migration as talked about in this aritcle[ https://poly4.hashnode.dev/migrating-frontend-deployment-across-aws-accounts]
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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"s3:CreateBucket", | |
"s3:DeleteBucket", | |
"s3:ListBucket", | |
"s3:GetObject", | |
"s3:PutObject", | |
"s3:DeleteObject", | |
"s3:ListBucketMultipartUploads", | |
"s3:AbortMultipartUpload" | |
], | |
"Resource": [ | |
"arn:aws:s3:::your-bucket-name", | |
"arn:aws:s3:::your-bucket-name/*", | |
"arn:aws:s3:::your-other-bucket-name", | |
"arn:aws:s3:::your-other-bucket-name/*" | |
] | |
}, | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"cloudfront:CreateDistribution", | |
"cloudfront:GetDistribution", | |
"cloudfront:UpdateDistribution", | |
"cloudfront:DeleteDistribution", | |
"cloudfront:ListDistributions" | |
], | |
"Resource": "*" | |
}, | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"acm:RequestCertificate", | |
"acm:DescribeCertificate", | |
"acm:DeleteCertificate", | |
"acm:ListCertificates" | |
], | |
"Resource": "*" | |
}, | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"route53:CreateHostedZone", | |
"route53:GetHostedZone", | |
"route53:UpdateHostedZoneComment", | |
"route53:DeleteHostedZone", | |
"route53:ListHostedZones", | |
"route53:ChangeResourceRecordSets", | |
"route53:ListResourceRecordSets", | |
"route53:GetChange" | |
], | |
"Resource": "*" | |
}, | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"iam:PassRole" | |
], | |
"Resource": "*", | |
"Condition": { | |
"StringEquals": { | |
"iam:PassedToService": "cloudfront.amazonaws.com" | |
} | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment