bug: cfn.LambdaWrap doesn't fail correctly when custom resources error out
Open
bug
type/cfn
- Dominant language
- Go
- Stars
- 3.8k
- Forks
- 578
- Avg merge
- 8h 18m
- Merged PRs (30d)
- 1
Description
Hi,
When creating lambda functions that respond to CFN Custom Resources, the `cfn.LambdaWrap` function does not make the resource creation fail as it should when returning an error.
Example:
```
func main() {
lambda.Start(cfn.LambdaWrap(boom))
}
func boom(ctx context.Context, event cfn.Event) (physicalResourceID string, data map[string]interface{}, err error) {
return "", nil, errors.New("BOOM")
}
```
Expected result:
The custom cloudformation resource creation fails, and rolls back.
Actual result:
Resource creation succeeds.
Contributor guide
Assessment
This issue has not been assessed yet.