A company uses an Amazon CloudFront distribution to serve its global application. The primary origin is an Application Load Balancer (ALB) serving dynamic API requests, and the secondary origin is an Amazon S3 bucket containing a static maintenance page configured within a CloudFront Origin Group for failover. The objects in the S3 bucket are encrypted using AWS KMS customer managed keys (SSE-KMS). During a recent test, a SysOps administrator notices two issues:
1. When failover to the S3 bucket is triggered, clients receive HTTP 403 Forbidden errors.
2. During normal operation, the ALB fails to process API client requests that require user authorization tokens because these headers are stripped before reaching the origin.
Which TWO actions should the SysOps administrator take to resolve these issues? (Select TWO.)
- Create an Origin Access Control (OAC) and associate it with the S3 origin. Update the S3 bucket policy to allow the CloudFront service principal `s3:GetObject` access, and update the KMS key policy to grant the CloudFront service principal `kms:Decrypt` permission.Cevap
- Associate the `Managed-AllViewerExceptHostHeader` Origin Request Policy and the `Managed-CachingDisabled` Cache Policy with the Application Load Balancer (ALB) cache behavior.Cevap
- CCreate an Origin Access Identity (OAI) and associate it with the S3 origin. Update the S3 bucket policy to allow the OAI read access, and update the KMS key policy to grant the OAI `kms:Decrypt` permission.
- DUpdate the default Cache Policy associated with the Application Load Balancer (ALB) behavior to include the `Authorization` header in the Cache Key settings.
- EConfigure the secondary S3 origin to use a S3 bucket policy that allows public read access (`s3:GetObject`) with a condition that restricts access to the VPC ID where the Application Load Balancer (ALB) is deployed.