0
I am using the following bucket policy:
{ "Version": "2012-10-17", "Id": "Policy1566337631537", "Statement": [ { "Sid": "Stmt156", "Effect": "Deny", "Principal": "", "Action": "s3:PutObject", "Resource": "arn:aws:s3:::jmalacho-test-bucket23/*", "Condition": { "StringNotEquals": { "s3:x-amz-server-side-encryption-aws-kms-key-id": "arn:aws:kms:us-east-2:123456789012:alias/ExampleAlias" } } } ] }
Then when I try to upload a file using the CLI I get an Access Denied error.
aws s3 cp notes.txt s3://jmalacho-test-bucket23/notes.txt --sse aws:kms --sse-kms-key-id alias/ExampleAlias
If I use the key-id arn, the pollicy works. Is it not possible to use an key-alias in a bucket policy?
Thanks