Awesome
AWS CDK Builder
:fire: Try AWS CDK Builder :fire:
Table of content
Features
AWS CDK Builder is a browser-based tool designed to streamline bootstrapping of Infrastructure as Code (IaC) projects using the AWS Cloud Development Kit (CDK). Equipped with a dynamic visual designer and instant TypeScript code generation capabilities, the CDK Builder simplifies the construction and deployment of CDK projects. It stands as a resource for all CDK users, providing a platform to explore a broad array of CDK constructs.
Deploy
You do not need to deploy the AWS CDK Builder to use it; an online version is available.
https://aws-samples.github.io/aws-cdk-stack-builder-tool
But if you wish to deploy it on your own account, here is a step-by-step guide.
Environment setup
Verify that your environment satisfies the following prerequisites:
You have:
- An AWS account
AdministratorAccess
policy granted to your AWS account (for production, we recommend restricting access as needed)- Both console and programmatic access
- NodeJS 18 installed
- If you are using
nvm
you can run the following before proceeding -
nvm install 18 && nvm use 18
- If you are using
- AWS CLI installed and configured to use with your AWS account
- Typescript 3.8+ installed
- AWS CDK CLI installed
- Docker installed
- Python 3+ installed
Deployment
- Clone the repository
git clone https://github.com/aws-samples/aws-cdk-stack-builder-tool
- Move into the cloned repository
cd aws-cdk-stack-builder-tool
<a id="deployment-dependencies-installation"></a> 3. Install the project dependencies by running this command
npm install
- (Optional) Bootstrap AWS CDK on the target account and region
Note: This is required if you have never used AWS CDK on this account and region combination. (More information on CDK bootstrapping).
npx cdk bootstrap aws://{targetAccountId}/{targetRegion}
You can now deploy by running:
npx cdk deploy
You can view the progress of your CDK deployment in the CloudFormation console in the selected region.
- Once deployed, take note of the
DomainName
...
Outputs:
cdk-builder.DomainName = https://dxxxxxxxxxxxxx.cloudfront.net
...
- Open the
DomainName
Url for the outputs above, i.e.https://dxxxxxxxxxxxxx.cloudfront.net
Clean up
You can remove the stacks and all the associated resources created in your AWS account by running the following command:
npx cdk destroy
Architecture
AWS CDK Builder is a serverless static website application, created using React and TypeScript.
Adding private constructs
If there are constructs which are not in the public npm js registry, they can be added as follows:
- Download the npm package:
npm pack <your-package> --pack-destination ./src/react-app/public/constructs
- Modify a blueprint to use the newly added package. For example, to change the
Blank
blueprint:
open ./src/react-app/src/blueprints/cdk-blank.ts
- Modify
libs: {
as follows:
libs: {
"@aws-cdk/aws-amplify-alpha": "2.x",
...
"@aws-cdk/region-info": "2.x",
"my-cool-lib-1.2.3.tgz": "local" // <-- This is the line to add, use filename as found in ./src/react-app/src/public/constructs as the key, and "local" as the value
},
Now when a project is created using the modified blueprint, it will have access to the private constructs.
License
This library is licensed under the MIT-0 License. See the LICENSE file.
- Changelog of the project.
- License of the project.
- Code of Conduct of the project.
- CONTRIBUTING for more information.