aws / aws/aws-sam-cli

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

Open
#9,208 1 comment 1 reaction 0 assignees View on GitHub
stage/needs-triage type/feature
Dominant language
Python
Stars
6.7k
Forks
1.2k
Avg merge
1d 10h
Merged PRs (30d)
52

Description

### 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

Contributor guide

Open the contributing guide

Research direction

Start with the template.yaml example, the AWS::ECR::Repository resource, and the AWS::Serverless::Function image Metadata fields, including Dockerfile, DockerContext, DockerTag, and DockerRepository. Trace how SAM CLI handles image builds and pushes, then verify that a repository URI supplied from the template can receive the resulting container image.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, docker, python
Domain
cloud, devops
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.