diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/lib/athena/start-query-execution.ts b/packages/@aws-cdk/aws-stepfunctions-tasks/lib/athena/start-query-execution.ts index 9918535134c67..0973734194573 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/lib/athena/start-query-execution.ts +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/lib/athena/start-query-execution.ts @@ -109,6 +109,10 @@ export class AthenaStartQueryExecution extends sfn.TaskStateBase { resources: [ this.props.resultConfiguration?.outputLocation?.bucketName ? cdk.Stack.of(this).formatArn({ + // S3 Bucket names are globally unique in a partition, + // and so their ARNs have empty region and account components + region: '', + account: '', service: 's3', resource: this.props.resultConfiguration?.outputLocation?.bucketName, resourceName: this.props.resultConfiguration?.outputLocation?.objectKey, diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/start-query-execution.test.ts b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/start-query-execution.test.ts index 6b3c24b62a045..5efe5525e9a99 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/start-query-execution.test.ts +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/athena/start-query-execution.test.ts @@ -216,15 +216,7 @@ describe('Start Query Execution', () => { { Ref: 'AWS::Partition', }, - ':s3:', - { - Ref: 'AWS::Region', - }, - ':', - { - Ref: 'AWS::AccountId', - }, - ':query-results-bucket/folder', + ':s3:::query-results-bucket/folder', ], ], },