Access Denied for bucket: Please check S3bucket permission error when setting access log for NLB
I was trying to enable the access log setting for NLB. At first, the S3 bucket policy setting I used was same as the one for ALB. However, I encountered this error today when I was trying to enable the access log setting for NLB.
Then I found this Japanese article mentioning that the bucket policy should be different between ALB and ELB.
The S3 bucket access policy for for storing AWS NLB access log should be:
The S3 bucket access policy for for storing AWS ALB access log should be:
aws_elb_account_id
is the account AWS used to store the access log to your S3 bucket. The account list can be found in ALB access log manual.
I will list AWS LB access log manuals for reference: