Skip to content

Commit f818d73

Browse files
committed
revert aws#108 to fix aws#237
1 parent 81cc163 commit f818d73

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

cfn/wrap.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,17 @@ func lambdaWrapWithClient(lambdaFunction CustomResourceFunction, client httpClie
4141
r.PhysicalResourceID, r.Data, err = lambdaFunction(ctx, event)
4242
funcDidPanic = false
4343

44-
if r.PhysicalResourceID == "" {
45-
log.Println("PhysicalResourceID must exist, copying Log Stream name")
46-
r.PhysicalResourceID = lambdacontext.LogStreamName
47-
}
4844
if err != nil {
4945
r.Status = StatusFailed
5046
r.Reason = err.Error()
5147
log.Printf("sending status failed: %s", r.Reason)
5248
} else {
5349
r.Status = StatusSuccess
50+
51+
if r.PhysicalResourceID == "" {
52+
log.Println("PhysicalResourceID must exist on creation, copying Log Stream name")
53+
r.PhysicalResourceID = lambdacontext.LogStreamName
54+
}
5455
}
5556

5657
err = r.sendWith(client)

0 commit comments

Comments
 (0)