Hands-on emulator lab · 6–10 min
Share a toolkit between functions — Lambda and Layer versions
Publish a shared helper layer and attach its exact version to a function.
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
Publish a shared helper layer and attach its exact version to a function.
Why this matters
Several functions can share a packaged toolkit. A layer version identifies one such package. You will publish a fixed practice layer and attach its exact version to a function.
Words you will use
A dependency is code your code uses. A layer is a versioned package of files that can be attached to compatible ZIP-based Lambda functions.
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 the function
Create the fixed practice function and wait for it to become Active. Its dependencies are a separate choice from the function’s own source code.
2. Publish and attach a layer
Publish a small fixed JavaScript helper package, then attach its returned version ARN. The package is supplied by the site; this lab does not accept executable code from visitors.
3. Inspect the attached version
Read the function configuration and compare the Layers ARN with the published version. This proves the attachment, not that the fixed handler imported or used the helper.
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.