Skip to content

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

Open
@jabalsad

Description

@jabalsad

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugtype/cfnissue or feature request related to the cfn package

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions