This project makes use of the recently added cross‑account access capabilities for AWS Step Functions. Thanks to this new feature, tasks in your Step Functions workflow can take advantage of identity-based policies to directly invoke resources in other AWS accounts.
- AWS:
- Must have completed the steps detailed in the Configuration section.
- Node.js + npm:
- Must be installed in your system.
- Poetry:
- Must be installed in your system.
Set the following variables in your local environment:
CDK_ACCOUNT_SRC
- The AWS account ID for the source stack (e.g.123456789012
)CDK_REGION_SRC
- The AWS region for the source stack (e.g.us-east-1
)CDK_ACCOUNT_TRG
- The AWS account ID for the target stack (e.g.123456789012
)CDK_REGION_TRG
- The AWS region for the target stack (e.g.us-east-1
)
After that, complete the CDK bootstrapping process for both the SRC
and TRG
accounts.
-
Execute the command below with a user having admin privileges in the
SRC
account:cdk bootstrap aws://$CDK_ACCOUNT_SRC/$CDK_REGION_SRC
-
Execute the command below with a user having admin privileges in the
TRG
account:cdk bootstrap aws://$CDK_ACCOUNT_TRG/$CDK_REGION_TRG --trust $CDK_ACCOUNT_SRC
npx projen install
Must be executed as admin of the SRC
account:
npx projen deploy --all --require-approval never
Must be executed as admin of the SRC
account:
npx projen destroy --all --force