aws / aws/aws-lambda-go

bug: cfn.LambdaWrap doesn't fail correctly when custom resources error out

Open
#404 0 comments 1 reaction 0 assignees View on GitHub
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

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.