Skip to content

Repository files navigation

AWS CDK Examples Banner

AWS CDK Examples

A collection of AWS CDK code samples crafted in TypeScript, featured on my blog at https://towardsthecloud.com/blog

Tip

We eliminate AWS complexity so you ship faster, spend less, and stay compliant.

Our managed AWS service gives you three things: a production-grade AWS CDK Landing Zone with built-in compliance controls, proactive monitoring that stops cost waste and security drift, and senior AWS expertise that speeds up your team's delivery.

Book a free demo to see where you stand and what we'd fix first:

Book a Free Demo

See the symptoms of a missing AWS foundation and how we solve them

AWS starts simple. Then you scale: production and staging blur together, resources multiply without owners, IAM policies accumulate exceptions, security findings pile up in backlogs, and the bill climbs month after month.

Those are symptoms of a missing AWS foundation. Without one, your developers spend more time fixing problems than shipping features.

We provide that foundation and own it entirely, so your team focuses on shipping, not firefighting.

Here's what's included:

1. We Provision a Secure AWS CDK Landing Zone That Accelerates Compliance

2. We Monitor Proactively to Stop Cost Waste and Security Drift

  • Quarterly cost reviews catch unattached volumes, oversized instances, and orphaned resources before they compound. AWS spend drops 20-30% on average, with outliers hitting 60+%
  • Continuous security monitoring across all accounts catches misconfigurations immediately. You get alerts while issues are still fixable, not after they're breaches

3. We Provide Senior AWS Expertise That Speeds Up Delivery

  • Your developers get production-ready IaC templates for common patterns: multi-AZ applications, event-driven architectures, secure data pipelines. What takes weeks of research ships in hours
  • Architecture guidance on VPC design, IAM policies, disaster recovery, and observability from engineers who've solved these problems at enterprise scale

"We achieved a perfect security score in days, not months." Galen Simmons, CEO of Accolade (Y Combinator startup)

How to run the code from the examples

To run a Typescript example, execute the following:

$ npm install -g aws-cdk
$ cd EXAMPLE_DIRECTORY
$ npm install
$ cdk synth
$ cdk deploy

Then, to dispose of the stack/s afterwards

$ cdk destroy

Table of Contents

AWS CDK Example Description Blogpost link
application-load-balanced-fargate-service Create an Application Load Balanced Fargate Service in AWS CDK Click here
cloudfront-s3-origin Create a CloudFront distribution with an S3 bucket as origin .
custom-role-lambda-function Create a custom IAM role for an AWS Lambda function Click here
aws-cdk-dependson-relation Create a DependsOn relation between resources in AWS CDK Click here
openid-connect-bitbucket Create a Bitbucket OpenID Connect (OIDC) provider in AWS CDK Click here
openid-connect-github Create a GitHub OpenID Connect (OIDC) provider in AWS CDK Click here
rds-with-cloudwatch-alarms Create an Amazon RDS instance with custom CloudWatch alarms .
scheduled-fargate-task Create a Scheduled Fargate Task example in AWS CDK Click here
scheduled-rds-stop-and-start Create a Scheduled stop and start function for an Amazon RDS Instance Click here
share-resources-across-stacks Create a stack where you share resources to another stack Click here

Author

Danny Steenman

Sponsor this project

Used by

Contributors

Languages