-
Notifications
You must be signed in to change notification settings - Fork 4.5k
(stepfunctions-tasks): CallAwsService produces invalid .sync Resource Arn (codebuild.startBuild action) #19174
Copy link
Copy link
Closed
Labels
@aws-cdk/aws-stepfunctions-tasksbugThis issue is a bug.This issue is a bug.effort/smallSmall work item – less than a day of effortSmall work item – less than a day of effortp2
Description
What is the problem?
A CallAwsService task with a CodeBuild startBuild action and IntegrationPattern.RUN_JOB fails on deploy with SCHEMA_VALIDATION_FAILED: The resource provided arn:aws:states:::aws-sdk:codebuild:startBuild.sync is not recognized.
An equivalent CodeBuildStartBuild task deploys as expected. Note the aws-sdk: portion of the ARN, which appears to be invalid State Machine syntax for the RUN_JOB pattern:
| Task Construct | Pattern | CDK-generated Resource Arn Stub | Deploys? |
|---|---|---|---|
| CallAwsService | RUN_JOB | arn:aws:states:::aws-sdk:codebuild:startBuild.sync |
❌ |
| CallAwsService | REQUEST_RESPONSE | arn:aws:states:::aws-sdk:codebuild:startBuild |
✅ |
| CodeBuildStartBuild | RUN_JOB | arn:aws:states:::codebuild:startBuild.sync |
✅ |
| CodeBuildStartBuild | REQUEST_RESPONSE | arn:aws:states:::codebuild:startBuild |
✅ |
Reproduction Steps
Two equivalent constructs to start a CodeBuild build:
const callAwsTask = new tasks.CallAwsService(this, 'CallAwsTask', {
integrationPattern: sfn.IntegrationPattern.RUN_JOB,
service: 'codebuild',
action: 'startBuild',
parameters: {
ProjectName: project.projectName,
},
iamResources: [project.projectArn],
});
const startBuildTask = new tasks.CodeBuildStartBuild(this, 'StartBuildTask', {
integrationPattern: sfn.IntegrationPattern.RUN_JOB,
project,
});What did you expect to happen?
Expected the two constructs to deploy successfully.
What actually happened?
The CallAwsService task fails to deploy with RUN_JOB integration.
SCHEMA_VALIDATION_FAILED: The resource provided arn:aws:states:::aws-sdk:codebuild:startBuild.sync is not recognized.
CDK CLI Version
2.14.0
Framework Version
No response
Node.js Version
14
OS
macos
Language
Typescript
Language Version
4.5.5
Other information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
@aws-cdk/aws-stepfunctions-tasksbugThis issue is a bug.This issue is a bug.effort/smallSmall work item – less than a day of effortSmall work item – less than a day of effortp2