-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Closed
Labels
@aws-cdk/custom-resourcesRelated to AWS CDK Custom ResourcesRelated to AWS CDK Custom ResourcesbugThis issue is a bug.This issue is a bug.effort/mediumMedium work item – several days of effortMedium work item – several days of effortmanagement/trackingIssues that track a subject or multiple issuesIssues that track a subject or multiple issuesp0
Description
Please add your +1 👍 to let us know you have encountered this
Status: In progress
Describe the bug
If I upgrade cdk & cdk-lib to 2.138.0 from 2.137.0, the following error occurs at deployment.
If I rollback, the error goes away.
CustomResource attribute error: Vendor response doesn't contain endpointAddress attribute in object ...|...IoTEndpointThis was previously working for quite some time.
The specific resource is an AwsCustomResource related to IoT.
(I could not find a way to get the endpoint using aws-cdk-lib/aws-iot, so had to use a custom resource)
Code repro below.
Expected Behavior
Deployment succeeds
Current Behavior
Deployment fails with the following error:
8:34:21 AM | UPDATE_FAILED | AWS::SSM::Parameter | fooservice/Stage2...IotEndpointAddress
CustomResource attribute error: Vendor response doesn't contain endpointAddress attribute in object
arn:aws:cloudformation:eu-central-1:<account>:stack/<...>|...IoTEndpoint...Reproduction Steps
import * as cus from 'aws-cdk-lib/custom-resources'
// https://stackoverflow.com/a/77092236
const getIoTEndpoint = new cus.AwsCustomResource(this, 'IoTEndpoint', {
onCreate: {
service: 'Iot',
action: 'describeEndpoint',
// I am guessing the failure is on the following line (and/or below)
physicalResourceId: cus.PhysicalResourceId.fromResponse('endpointAddress'),
parameters: {
endpointType: 'iot:Data-ATS'
}
},
policy: cus.AwsCustomResourcePolicy.fromSdkCalls({ resources: cus.AwsCustomResourcePolicy.ANY_RESOURCE })
})
// I am guessing the failure is on the following line (and/or above)
const IOT_ENDPOINT = getIoTEndpoint.getResponseField('endpointAddress') // eg, abc...xyz-ats.iot.us-west-2.amazonaws.comPossible Solution
Rollback cdk-lib to 2.137.0
Additional Information/Context
No response
CDK CLI Version
2.119.0 (build 0392e71)
Framework Version
2.138.0
Node.js Version
v20.7.0
OS
MacOS
Language
TypeScript
Language Version
5.4.5
Other information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
@aws-cdk/custom-resourcesRelated to AWS CDK Custom ResourcesRelated to AWS CDK Custom ResourcesbugThis issue is a bug.This issue is a bug.effort/mediumMedium work item – several days of effortMedium work item – several days of effortmanagement/trackingIssues that track a subject or multiple issuesIssues that track a subject or multiple issuesp0