aws / aws/aws-sam-cli

Feature request: --image-repository should not be always required when PackageType is Image

Open
#5,372 1 comment 5 reactions 0 assignees View on GitHub
area/deploy 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 came across an issue that when we use PackageType is Image, however we don't actually build/use image from docker file, it is pulling image straight from ECR. But somehow when doing deployment `sam deploy` it requires us to provide `--image-repository`

```yaml
GreetingFunctionUseDocker:
Type: AWS::Serverless::Function
Properties:
PackageType: Image
ImageUri: xxxxxxxxxx.dkr.ecr.us-west-2.amazonaws.com/greeting:latest
```

### Proposal

Only require ECR when building image from docker file.

Things to consider:
1. Will this require any updates to the [SAM Spec](https://github.com/awslabs/serverless-application-model)

### Additional Details

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.