`--resolve-image-repos` produces invalid repository and output names for container functions in substacks
- 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
Assessment
This issue has not been assessed yet.