File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -22,18 +22,16 @@ func lambdaWrapWithClient(lambdaFunction CustomResourceFunction, client httpClie
2222 fn = func (ctx context.Context , event Event ) (reason string , err error ) {
2323 r := NewResponse (& event )
2424 r .PhysicalResourceID , r .Data , err = lambdaFunction (ctx , event )
25-
25+ if r .PhysicalResourceID == "" {
26+ log .Println ("PhysicalResourceID must exist, copying Log Stream name" )
27+ r .PhysicalResourceID = lambdacontext .LogStreamName
28+ }
2629 if err != nil {
2730 r .Status = StatusFailed
2831 r .Reason = err .Error ()
2932 log .Printf ("sending status failed: %s" , r .Reason )
3033 } else {
3134 r .Status = StatusSuccess
32-
33- if r .PhysicalResourceID == "" {
34- log .Println ("PhysicalResourceID must exist on creation, copying Log Stream name" )
35- r .PhysicalResourceID = lambdacontext .LogStreamName
36- }
3735 }
3836
3937 err = r .sendWith (client )
You can’t perform that action at this time.
0 commit comments