SOA-C02 • Practice Test 50
Free SOA-C02 practice test — 15 questions with explanations. Set 50. No signup required.
A CloudFormation template creates an S3 bucket with encryption and a bucket policy as shown in the exhibit. An administrator tries to upload an object using the AWS CLI without specifying any encryption. What will happen?
Refer to the exhibit.
```
Resources:
MyBucket:
Type: AWS::S3::Bucket
Properties:
BucketName: my-secure-bucket
BucketEncryption:
ServerSideEncryptionConfiguration:
- ServerSideEncryptionByDefault:
SSEAlgorithm: AES256
MyBucketPolicy:
Type: AWS::S3::BucketPolicy
Properties:
Bucket: !Ref MyBucket
PolicyDocument:
Statement:
- Effect: Deny
Principal: '*'
Action: 's3:PutObject'
Resource: !Sub '${MyBucket.Arn}/*'
Condition:
StringNotEquals:
s3:x-amz-server-side-encryption: 'AES256'
```