aws / aws/aws-sam-cli

Bug: Build succeeds with duplicated resource ids

Open
#4,127 2 comments 0 reactions 0 assignees View on GitHub
area/build maintainer/need-followup type/bug
Dominant language
Python
Stars
6.7k
Forks
1.2k
Avg merge
1d 10h
Merged PRs (30d)
52

Description

### Description:
When two resources have the same PhysicalId `sam build` will succeed but will silently omit one of the resources from the output template

### Steps to reproduce:

Run `sam build` on the attached template

### Observed result:

The build will succeed and only one lambda resource will be defined in the output

### Expected result:

An error occurs when `sam build` is run

### Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
[sam-app.zip](https://github.com/aws/aws-sam-cli/files/9367148/sam-app.zip)

1. OS: MacOS 12.5
2. `sam --version`: 1.47.0
3. AWS region: N/A

`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.