Skip to content

(stepfunctions-tasks): CallAwsService produces invalid .sync Resource Arn (codebuild.startBuild action) #19174

@fedonev

Description

@fedonev

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions