Skip to content

Commit 3eb723e

Browse files
authored
Merge pull request #62 from ServerlessLife/fix-cr-random-update-causes-deploy-failure
fix: The IoT custom resource should return the endpoint even on updates
2 parents 9e112eb + a1b1a6d commit 3eb723e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/ServerlessSpy.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,15 @@ export class ServerlessSpy extends Construct {
8888
endpointType: 'iot:Data-ATS',
8989
},
9090
},
91+
onUpdate: {
92+
service: 'Iot',
93+
action: 'describeEndpoint',
94+
physicalResourceId:
95+
custom_resources.PhysicalResourceId.fromResponse('endpointAddress'),
96+
parameters: {
97+
endpointType: 'iot:Data-ATS',
98+
},
99+
},
91100
installLatestAwsSdk: false,
92101
policy: custom_resources.AwsCustomResourcePolicy.fromSdkCalls({
93102
resources: custom_resources.AwsCustomResourcePolicy.ANY_RESOURCE,

0 commit comments

Comments
 (0)