Skip to content

Commit

Permalink
revert aws#108 to fix aws#237
Browse files Browse the repository at this point in the history
  • Loading branch information
bmoffatt committed Oct 10, 2019
1 parent 81cc163 commit f818d73
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions cfn/wrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,17 @@ func lambdaWrapWithClient(lambdaFunction CustomResourceFunction, client httpClie
r.PhysicalResourceID, r.Data, err = lambdaFunction(ctx, event)
funcDidPanic = false

if r.PhysicalResourceID == "" {
log.Println("PhysicalResourceID must exist, copying Log Stream name")
r.PhysicalResourceID = lambdacontext.LogStreamName
}
if err != nil {
r.Status = StatusFailed
r.Reason = err.Error()
log.Printf("sending status failed: %s", r.Reason)
} else {
r.Status = StatusSuccess

if r.PhysicalResourceID == "" {
log.Println("PhysicalResourceID must exist on creation, copying Log Stream name")
r.PhysicalResourceID = lambdacontext.LogStreamName
}
}

err = r.sendWith(client)
Expand Down

0 comments on commit f818d73

Please sign in to comment.