Skip to content

Commit b03d958

Browse files
authored
revert #108 to fix #237 (#241)
1 parent abc9ba2 commit b03d958

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

cfn/wrap.go

+5-4
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,17 @@ func lambdaWrapWithClient(lambdaFunction CustomResourceFunction, client httpClie
4242
r.PhysicalResourceID, r.Data, err = lambdaFunction(ctx, event)
4343
funcDidPanic = false
4444

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

5758
err = r.sendWith(client)

0 commit comments

Comments
 (0)