Production-ready AWS CDK Python starter kit template with secure OIDC authentication and automated CI/CD. Deploy infrastructure to AWS in minutes with projen-powered configuration.
- ⚡ Rapid Setup: Jumpstart your project within minutes by tweaking a single configuration file (projen)
- Preconfigured Python with optimized pip dependency management in requirements.txt
- Pre-configured linting & formatting with Ruff for code quality
- Clean project structure for easy management of constructs and stacks
- 🛡️ Seamless Security: OIDC authentication for keyless AWS deployments - no stored credentials or long-lived secrets required
- 🤖 Automated CI/CD: Out-of-the-box GitHub Actions workflows with multi-account support for enterprise-ready deployments
- 🚀 Enhanced Pull Requests: Built-in pull request template for structured and informative code reviews
Tip
Towards the Cloud runs the AWS foundation for modern product teams. This means your team ships faster, slashes AWS spend, and stay audit-ready without having to hire a platform squad.
Unsure where to start? Book a free AWS Account Review. We’ll analyse your AWS environment, hand you a security & cost report, and you decide whether to act on it yourself or have us execute. No pressure, no retainer required up front.
☁️ See how we turn AWS chaos into a compliant, cost-efficient platform…
Ad‑hoc builds become 40–60% overspend, unmonitored security gaps put customer data at risk, and engineers burn out running infrastructure instead of shipping products.
- ✅ Compliant Landing Zone – Multi-account AWS CDK deployment with 100% CIS benchmark coverage, centralized logging, and SSO-ready access control.
- ✅ Production-ready CDK components – Pre-hardened building blocks so teams launch new services without reinventing best practices.
- ✅ CI/CD with safe rollbacks – GitOps workflows and governed pipelines that let you release faster with confidence.
- ✅ Quarterly cost & security reviews – Cost Optimisation plus Security Reviews delivered proactively.
- ✅ Fractional Cloud Engineer – On-demand expertise from an architect who implemented enterprise-grade AWS infrastructure for over a decade.
- 30%+ lower AWS bill – Continuous oversight prevents expensive drift (30–60% documented savings).
- SOC 2 / HIPAA acceleration – Guardrails, logging, and evidence packs ready on day one.
- Audit-ready every quarter – Automated monitoring plus recurring reviews keep findings under control.
- Faster product velocity – Engineers build features, not managing infrastructure.
- Headcount leverage – A flexible retainer replaces the cost of a full-time platform team.
Proof: Y Combinator startup Accolade used our Landing Zone to earn SOC 2 in record time:
“We achieved a perfect security score in days, not months.” — Galen Simmons, CEO
Ready to see where your AWS account stands? Grab a spot while they’re available:
All the config that is needed to personalise the CDK App to your environment is defined in the .projenrc.py file.
To get started, follow these steps:
-
Click the green "Use this template" button to create a new repository based on this starter kit.
-
Add a Personal Access Token to the repository settings on GitHub, follow these instructions for setting up a fine-grained personal access token.
-
Install the AWS CDK CLI and projen:
npm install -g aws-cdk projen -
Install the projects dependencies using:
pip install -r requirements.txtandpip install -r requirements-dev.txt -
Customize the AWS Region and Account IDs in the .projenrc.py file to match your AWS setup:
# Define the AWS region for the CDK app and github workflows
# Default to us-east-1 if AWS_REGION is not set in your environment variables
aws_region = os.getenv("AWS_REGION", "us-east-1")
# Set the CDK_DEFAULT_REGION environment variable for the projen tasks,
# so the CDK CLI knows which region to use
project.tasks.add_environment("CDK_DEFAULT_REGION", aws_region)
# Define the target AWS accounts for the different environments
target_accounts = {
"dev": "987654321012",
"test": "123456789012",
"staging": None,
"production": None,
}-
Run
projento generate the github actions workflow files. -
AWS CLI Authentication: Ensure you're logged into an AWS Account (one of the ones you configured in step 4) via the AWS CLI. If you haven't set up the AWS CLI, then follow this guide)
-
Deploy the CDK toolkit stack to your AWS environment with
cdk bootstrapif it's not already set up. -
Deploy the GitHub OIDC Stack to enable GitHub Actions workflow permissions for AWS deployments. For instance, if you set up a
devenvironment, executeprojen dev:deploy. -
Commit and push your changes to the
mainbranch to trigger the CDK deploy pipeline in GitHub.
Congratulations 🎉! You've successfully set up your project.
When working on smaller projects using infrastructure as code, where you deploy single applications that don’t demand extensive maintenance or collaboration from multiple teams, it’s recommended to structure your AWS CDK project in a way that enables you to deploy both the application and infrastructure using a single stack.
However, as projects evolve to encompass multiple microservices and a variety of stateful resources (e.g., databases), the complexity inherently increases.
In such cases, adopting a more sophisticated AWS CDK project organization becomes critical. This ensures not only the ease of extensibility but also the smooth deployment of each component, thereby supporting a more robust development lifecycle and facilitating greater operational efficiency.
To cater to these advanced needs, your AWS CDK project should adopt a modular structure. This is where the AWS CDK Python Starter Kit shines ✨.
Here’s a closer look at how this structure enhances maintainability and scalability:
.
├── cdk.json
├── requirements.txt
├── requirements-dev.txt
├── README.md
├── src
│ ├── __init__.py
│ ├── app.py
│ ├── assets
│ │ ├── ecs
│ │ │ └── hello-world
│ │ │ └── Dockerfile
│ │ └── lambda
│ │ └── hello-world
│ │ └── lambda_function.py
│ ├── bin
│ │ ├── cicd_helper.py
│ │ ├── env_helper.py
│ │ └── git_helper.py
│ ├── custom_constructs
│ │ ├── __init__.py
│ │ ├── base_construct.py
│ │ ├── network_construct.py
│ │ └── README.md
│ └── stacks
│ ├── __init__.py
│ ├── base_stack.py
│ ├── github_oidc_stack.py
│ └── README.md
└── tests
├── __init__.py
└── test_example.pyAs you can see in the above tree diagram, the way this project is setup it tries to segment it into logical units, such as constructs for reusable infrastructure patterns, stacks for deploying groups of resources and assets for managing source code of containers and lambda functions.
Here is a brief explanation of what each section does:
src/assets: Organizes the assets for your Lambda functions and ECS services, ensuring that the application code is neatly encapsulated with the infrastructure code.src/bin: Contains utility scripts (e.g.,cicd_helper.py,env_helper.py,git_helper.py) that streamline environment setup and integration with CI/CD pipelines.src/custom_constructs: Houses the core building blocks of your infrastructure. These constructs can be composed into higher-level abstractions, promoting reusability across different parts of your infrastructure. Check out the README in the constructs folder to read how you can utilize environment-aware configurations.src/stacks: Dedicated to defining stacks that represent collections of AWS resources (constructs). This allows for logical grouping of related resources, making it simpler to manage deployments and resource dependencies. Check out the README in the stacks folder to read how you can instantiate new stacks.src/lib/main.ts: This is where the CDK app is instantiated.test: Is the location to store your unit or integration tests (powered by jest)
Looking for the TypeScript version of this AWS CDK Starter Kit? Check out the AWS CDK Starter Kit for a tailored experience that leverages the full power of AWS CDK with TypeScript.
A heartfelt thank you to the creators of projen. This starter kit stands on the shoulders of giants, made possible by their pioneering work in simplifying cloud infrastructure projects!
