Feature request: Allow SAM to push container images to repository specified in template

Author: KylePeterDaviesCreated Aug 31, 2026Updated Sep 4, 2026
Labelstype/featurestage/needs-triage

Describe your idea/feature/enhancement

I would like to be able to create a Elastic Container Repository in my SAM template.yaml and be able to use it to push Container Images using the Metadata for AWS::Serverless::Function

Proposal

yaml
StartMachineRepository:
  Type: AWS::ECR::Repository
  Properties:
    RepositoryName: discord/start_function
StartMachineLambda:
  Type: AWS::Serverless::Function
  Properties:
    PackageType: Image
    Architectures:
      - arm64
  Metadata:
    Dockerfile: functions/start_machine/Dockerfile.lambda
    DockerContext: .
    DockerTag: latest 
    DockerRepository:  !Sub "${StartMachineRepository.RepositoryUri}"

Additional Details