Companion Stack Support for Nested Stack
- Dominant language
- Python
- Stars
- 6.7k
- Forks
- 1.2k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 52
Description
### Description:
Auto ECR Companion stacks do not support nested Lambda functions.
"Template format error: Resource name NestedStackName/Function1aa1a123Repo is non alphanumeric." in CFN.
> When building the Companion Stack (ECR Repos) template , the LogicalId of the AWS::ECR::Repository resource type is generated as "`<><>Repo`". This is as can be seen in Code directly here - https://github.com/aws/aws-sam-cli/blob/ec9f5d89971b823fa01071c96b7de90ea5e5303a/samcli/lib/bootstrap/companion_stack/data_types.py#L105
> However, when generating the Companion Stack template the FunctionName is actually picked up as the the fullpath of the function - `<>/<>`.
> This is can be seen here - https://github.com/aws/aws-sam-cli/blob/71f3a84f1b1ad29f2c833ad5a887659bed4798bf/samcli/lib/bootstrap/companion_stack/companion_stack_manager.py#L313
### Steps to reproduce:
### Observed result:
### Expected result:
### Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
1. OS:
2. `sam --version`:
3. AWS region:
`Add --debug flag to command you are running`
Contributor guide
Assessment
This issue has not been assessed yet.