Hands-on emulator lab · 6–10 min
Share cached pages without mixing visitors — CloudFront and Cache policies
Create a cache policy, change its lifetime, and verify the new version.
These actions use an isolated AWS Emulator. It stores API state locally; it does not create paid cloud resources or run the full hosted AWS service.
Your goal
Create a cache policy, change its lifetime, and verify the new version.
Why this matters
A cache policy controls which requests share a cached copy and how long it may stay. You will update a policy’s lifetime using its version token. This exercise uses public-content settings, not personalized pages.
Words you will use
A cache stores a response for reuse. A cache key decides which requests share it. Headers, cookies, and query strings can change what a server returns.
How to proceed
Start a fresh emulator, read each numbered step, and enter the practice settings shown. Run the action, inspect its API receipt, then continue. Finish lab checks the emulator state again before saving your progress.
1. Create a public-content cache policy
Create a policy with a 60-second default lifetime and no cookies or query strings in its key. Use this model only for content that can be shared; private pages need a suitable design.
2. Change the cache lifetime
Choose a new default TTL and update the policy using its ETag. The ETag identifies the version you read and helps prevent overwriting a different update.
Default cache lifetime in seconds: Use 0–3600 seconds. This lab checks policy state, not actual cached responses. Suggested practice value: 120.
3. Read the updated policy
Retrieve the policy again and compare DefaultTTL with your choice. Notice that configuring a cache key is different from proving private data can never be shared.
Practice, then check your understanding
Perform the actions yourself and inspect the returned state. Errors keep your settings so you can retry. Starting another lab clears the previous live environment. Earned XP is kept, and signed-in achievements sync to your account. Replay does not award duplicate XP.
Read the official AWS documentation for service behavior and production details.