You deploy a CloudFront distribution with an origin at an S3 bucket. You need signed URLs and must also support caching efficiently while preventing content leaks. Which strategy best satisfies both goals?
Answer
Enable signed URLs and use a Cache Policy that includes the authorization-related query parameters in the cache key appropriately.
Explanation
Signed URLs restrict access at the edge, while careful cache key configuration avoids mixing responses across different signatures/tenants. Disabling caching or relying on S3 privacy alone doesn’t fully address edge enforcement and leakage risk.
Last reviewed: October 2026
Reviewed by FirstInTest Editorial Team
Related questions
A Lambda function processes S3 ObjectCreated events. You see occasional duplicate processing for the same key. The S3 bucket has versioning enabled. What is the best mitigation approach at the application level?
View question →
Service A exposes a REST API. It calls an internal service over HTTP and needs to handle intermittent upstream timeouts without masking downstream failures. It currently retries all errors including 4xx. In addition, requests must include a correlation ID for support. What change most improves correctness and debuggability?
View question →
In AWS AppSync, you enable fine-grained authorization with resolvers that call Lambda. To prevent privilege escalation from client arguments, what is the most robust security control?
View question →
A backend uses EventBridge to route events to multiple targets. You need to guarantee ordering for events with the same entity key while minimizing latency. Which design is most appropriate?
View question →
A service exposes an API through API Gateway + Lambda. The Lambda function receives requests with an incoming Authorization header. Which configuration most directly ensures that only validated JWT claims are trusted by the Lambda without extra custom parsing?
View question →
A developer wants to use Step Functions to orchestrate a workflow with compensation. They must handle retries with jitter and avoid duplicating side effects when activities are retried. What is the best practice?
View question →