Explain it simpler
Before AWS can run your code, you have to hand it over in a box. Lambda accepts two kinds of box. The first is a .zip file: your code plus the libraries it needs, run on a language environment that AWS keeps patched. The second is a container image, a bigger, self-contained box you build yourself and store in Amazon's image library, ECR. Layers are like shared toolkits that many functions can borrow so each box stays small. CodeArtifact is a private, managed shelf for software libraries, so your builds always get the same trusted versions. Think of moving house: small items go in standard boxes, a piano needs a crate, and the tools everyone shares live in the garage.
It is Thursday afternoon at Lantern Analytics, and Priya has just added a forecasting library to the team's Lambda function. The deploy script fails with a message that the unzipped package is too large. She trims the tests folder and tries again. This time the upload works, but the first invocation dies with an import error about a missing shared object file, a library she built on her laptop. Her manager asks whether they should split the code into layers, move to a container image, or set up a private package repository. Three different tools, one broken release, and a demo tomorrow morning. Which packaging choice actually fixes her problem, and why?
Every Lambda function starts life as a deployment artifact, the packaged form of your code that the service stores and runs. The AWS Certified Developer Associate exam expects you to know the two Lambda packaging formats, the size limits that push you from one to the other, how dependencies must be built, how layers share code, and how AWS CodeArtifact keeps package sources under control. Most questions describe a symptom, such as a size error or an import failure, and ask which packaging change fixes it.
Keep reading for free
Create a free StudyToCert account to read the rest of this lesson: 8 more sections, 7 key terms, a real-world example, an exam tip and self-check questions. Every lesson, lab and practice test is free with an account.