aws / aws/aws-sam-cli

`--resolve-image-repos` produces invalid repository and output names for container functions in substacks

Open
#3,478 1 comment 2 reactions 0 assignees View on GitHub
area/deploy stage/bug-repro
Dominant language
Python
Stars
6.7k
Forks
1.2k
Avg merge
1d 10h
Merged PRs (30d)
52

Description

### Description:

If `AWS::Serverless::Fuinction` is used to define a container (Docker) based function in a sub-stack referrenced via `AWS::Serverless::Application` in the main template, AND `--rsolve-image-repos` is used, AWS CLI produces invlaid ECR repository and sub-stack Outputs names.

The names include the illegal character `/` and are of the form:
`/`

### Steps to reproduce:

- Create a porimary SAM template with `AWS::Serverless::Application` referencing a sub-template
- Define a container based `AWS::Serverless::Funciton` resource in the sub-template
- Run `sam build` with `--resolve-image-repos`
- NOTICE: the generated repo and output names contain invalid characters

### Observed result:

### Expected result:

`sam cli` should escape generated names so that they are compliant with Cloudformation resource naming rules

### Additional environment details (Ex: Windows, Mac, Amazon Linux etc)

1. OS: Linux (Ubuntu 20.04)
2. `sam --version`: SAM CLI, version 1.35.0
3. AWS region: us-west-2 and us-east-1

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.