(aws-eks): Inconsistent fargateProfileName Handling Causes Deletion Failure When PhysicalResourceId Exceeds 100 Characters #32909
Labels
@aws-cdk/aws-eks
Related to Amazon Elastic Kubernetes Service
bug
This issue is a bug.
effort/medium
Medium work item – several days of effort
p1
Describe the bug
When creating an EKS FargateProfile using the AWS CDK,
the onCreate event correctly handles long fargateProfileName values by generating a valid name using the generateProfileName() function if none is provided.
However, in the onDelete event, this logic is missing.
The deletion process directly uses the physicalResourceId as the fargateProfileName without validating its length.
If the physicalResourceId exceeds 100 characters, it results in an error during deletion
because
Regression Issue
Last Known Working CDK Version
No response
Expected Behavior
The onDelete event should handle long physicalResourceId values consistently with the creation process.
and use the same function to generate the fargateProfileName for the delete action
Current Behavior
Stack deleting failed due to that reason
Received response status [FAILED] from custom resource. Message returned: The Fargate profile name parameter should not be greater than 100 characters. Logs:
Reproduction Steps
Possible Solution
Adding the same logic to the onDelete event.
Additional Information/Context
No response
CDK CLI Version
2.175.1
Framework Version
No response
Node.js Version
22
OS
MacOS
Language
TypeScript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: