Code Signing with AWS Signer - Ensuring Trust for Lambda Functions and Container Images

Apply code signing to Lambda functions and container images, enforce signature verification in CI/CD pipelines, and handle compromises through signature revocation.

Why Code Signing Is Necessary

Code signing is a mechanism that cryptographically guarantees that deployed code comes from a trusted publisher and has not been tampered with. Even if a build pipeline is compromised in a supply chain attack, signature verification prevents deployment of unauthorized code. AWS Signer provides signing and verification for Lambda function deployment packages and container images.

Lambda Code Signing

Lambda's Code Signing Configuration defines the ARNs of trusted signing profiles (up to 20) and the action to take on signature verification failure (Warn or Enforce). In Enforce mode, deployment of unsigned functions or functions signed with untrusted signing profiles is blocked. In CI/CD pipelines, you build a flow where CodeBuild builds a ZIP package, Signer signs it, and the signed package is deployed to Lambda.

Container Image Signing and CI/CD Integration

AWS Signer supports Notation-format signing for ECR container images. In the CI/CD pipeline's build stage, images are built, signed with Signer, and then pushed to ECR. EKS admission controllers enforce signature verification, rejecting deployment of unsigned images. Signing profiles define the cryptographic keys and validity period used for signing; once a profile expires, new signatures cannot be generated. Signature revocation invalidates code signed with a compromised signing profile. To deepen your practical knowledge of Signer, specialized books (Amazon) can be helpful.

Signer Pricing

AWS Signer pricing is based on the number of signing operations. Lambda code signing costs approximately $0.005 per signature, and container image signing costs approximately $0.50 per signature. Signature verification is free. When CI/CD pipelines frequently build and sign, container image signing costs can accumulate, so manage costs by skipping signing in development environments and enforcing it only in staging and production. There are no additional charges for managing signing profiles.

Summary

AWS Signer is a service that provides code signing for Lambda functions and container images, cryptographically guaranteeing the trustworthiness of deployed code. Sign during the CI/CD pipeline's build stage and enforce signature verification through Lambda's code signing configuration or EKS admission controllers. Signature revocation lets you invalidate code from compromised signing profiles.