Feature request: Allow SAM to push container images to repository specified in template
- 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
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