A template repository for AWS CDK TypeScript development with devcontainer configuration. Ready-to-use development environment with pre-configured tools and dependencies for cloud infrastructure as code development using AWS CDK and TypeScript.
This template provides a complete development environment for AWS CDK projects using TypeScript. The dev container comes pre-configured with:
- Node.js 22 on Debian Bullseye
- AWS CLI
- AWS CDK CLI
- Git and other essential development tools
- VS Code extensions for TypeScript, AWS, and more
- Preconfigured linting and formatting settings
Using dev containers ensures consistent development environments across team members and reduces the "it works on my machine" problem.
There are two ways to use this template:
Option A: Use GitHub's "Use this template" feature
- Click the "Use this template" button at the top of this repository
- Give your new repository a name
- Choose to make it public or private
- Click "Create repository from template"
Option B: Clone and reinitialize
# Clone the template repository
git clone https://github.com/yourusername/aws-cdk-typescript-devcontainer.git my-new-project
cd my-new-project
# Remove existing git history and start fresh
rm -rf .git
git init
git add .
git commit -m "Initial commit from template"If you used Option A above:
git clone https://github.com/yourusername/your-new-repo-name.git
cd your-new-repo-namecode .- Install the Remote - Containers extension in VS Code if you haven't already
- Click on the green button in the lower-left corner of VS Code
- Select "Reopen in Container" from the menu
VS Code will build the dev container and open your project inside it. This may take a few minutes the first time.
-
Edit
.devcontainer/devcontainer.jsonto:- Change the container name to match your project
- Uncomment or add any additional tools or extensions you need
- Configure environment-specific settings
-
Replace this README.md with your project-specific documentation
Once your dev container is running:
-
Initialize your CDK project:
cdk init app --language typescript
-
Start building your infrastructure!
- Container fails to build: Check Docker is running and you have sufficient disk space
- AWS credentials not working: Ensure you've configured your AWS credentials correctly
- VS Code extensions not loading: Try rebuilding the container with the "Rebuild Container" command
Contributions to improve this template are welcome! Please submit a pull request or open an issue.
This template is available under the MIT License.