- Newest
- Most votes
- Most comments
From your StackOverflow question, I see you are getting the error Malformed ARN: ${Token[TOKEN.110]}
. It looks like you may be using CDK and are making an AWS SDK call in your CDK application code. I will answer as though that is the case. If I have misinterpreted your situation, please provide additional details of what your stack code looks like and how/where the StartTaskExecution call is being made and I can try to assist further.
CDK uses tokens to resolve unknown values within the resulting CloudFormation templates. These are encoded to a value similar to${Token[TOKEN.110]}
. The resolved values of these are not available to be used directly in the code of your CDK application. Instead, they are translated to the proper CloudFormation Ref
intrinsic calls when the CloudFormation template is synthesized. CloudFormation then further resolves these values at deployment time to the actual value. Please refer to the documentation on Tokens for additional information [1]. If you wish to call StartTaskExecution on a task created in your CDK stack, then you have two options:
- Use a custom resource [2] to either wrap AWS SDK calls or write a custom Lambda function. This framework allows you to customize how creates, updates, and deletes on your stack are handled.
- Create a CloudFormation output using CfnOutput [3] for the Task ARN and add an additional step in your pipeline AFTER your CDK deployment that looks up the Stack Output and calls StartTaskExecution using that ARN.
[1] https://docs.aws.amazon.com/cdk/v2/guide/tokens.html
[2] https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.custom_resources-readme.html
[3] https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.CfnOutput.html
Relevant content
- asked a year ago
- asked 3 years ago
- asked a year ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago