I am using the following bucket policy for S3
{
"Sid": "elasticloadbalanceraccountid",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::127311923021:root"
},
"Action": "s3:PutObject",
"Resource": "arn:aws:s3:::my-access-logs-us-east-1/AWSLogs/${ACCOUNTID}/*"
},
When I span the NLB using the Cloudformation template, It fails in the NLB creation with the error – Access Denied for bucket: my-access-logs-us-east-1. Please check S3bucket permission (Service: ElasticLoadBalancingV2, Status Code: 400, and does the rollback.
I tried all possibility and also the troubleshooting page from AWS , Still facing the same issue.
- Any issue with this policy?
- Since its getting rollback, Is there a way to reproduce this Access Denied using AWS CLI?
- I use the SSE-KMS, Can this be responsible for the Access Denied error?
Any help on this issue is appreciated.