aws / aws/aws-sam-cli

Companion Stack Support for Nested Stack

Open
#3,458 2 comments 2 reactions 1 assignee Claimed by @CoshUS 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

### 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

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.