Skill 3.1.1
Manage the dependencies of the code module (for example, environment variables, configuration files, container images) within the package
Key Concepts
Libraries are declared in a dependency file such as requirements.txt, package.json or pom.xml and installed during the build, so the artifact is reproducible. For Lambda, dependencies go into the .zip package, into layers shared between functions, or into a container image built from an AWS base image. Native libraries must be built for the Lambda environment (Amazon Linux and the right architecture), which sam build --use-container handles.
Environment-specific values should not be baked into the artifact. Pass them as environment variables, read them from Parameter Store, Secrets Manager or AWS AppConfig, or supply them as CloudFormation parameters, so the same artifact can be promoted from test to production unchanged. AWS CodeArtifact hosts private package repositories for internal libraries.