Git Product home page Git Product logo

aws-cdk-examples's Introduction

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

Struggling with AWS complexity or stuck on-premise? Let's transform your cloud journey.

Schedule a call with me to find out how I can enhance your existing AWS setup or guide your journey from on-premise to the Cloud.

☁️ Discover more about my one-person business: Towards the Cloud

Hi, I'm Danny – AWS expert and founder of Towards the Cloud. With over a decade of hands-on experience, I specialized myself in deploying well-architected, highly scalable and cost-effective AWS Solutions using Infrastructure as Code (IaC).

When you work with me, you're getting a package deal of expertise and personalized service:

  • AWS CDK Proficiency: I bring deep AWS CDK knowledge to the table, ensuring your infrastructure is not just maintainable and scalable, but also fully automated.
  • AWS Certified: Equipped with 7 AWS Certifications, including DevOps Engineer & Solutions Architect Professional, to ensure best practices across diverse cloud scenarios.
  • Direct Access: You work with me, not a team of managers. Expect quick decisions and high-quality work.
  • Tailored Solutions: Understanding that no two businesses are alike, I Custom-fit cloud infrastructure for your unique needs.
  • Cost-Effective: I'll optimize your AWS spending without cutting corners on performance or security.
  • Seamless CI/CD: I'll set up smooth CI/CD processes using GitHub Actions, making changes a breeze through Pull Requests.

My mission is simple: I'll free you from infrastructure headaches so you can focus on what truly matters – your core business.

Ready to unlock the full potential of AWS Cloud?

Schedule your call

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

aws-cdk-examples's People

Contributors

dannysteenman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

aws-cdk-examples's Issues

application-load-balanced-fargate-service: No Fargate configuration exists for given values: 512 CPU , 512 memory

Hi,
While trying to deploy the application-load-balanced-fargate-service examples, CDK fails with the following error:

13:47:44 | CREATE_FAILED        | AWS::ECS::TaskDefinition                  | amazon-ecs-sample/TaskDef
Resource handler returned message: "Invalid request provided: Create TaskDefinition: No Fargate configuration exists for given values: 512 CPU
, 512 memory. See the Amazon ECS documentation for the valid values. (Service: AmazonECS; Status Code: 400; Error Code: ClientException; Reque

Running cdk synth in the scheduled fargate task project produces error

Error: If you configure PRIVATE subnets in 'subnetConfiguration', you must also configure PUBLIC subnets to put the NAT gateways into (got [{"cidrMask":20,"name":"data","subnetType":"Isolated"}].
at determineNatGatewayCount (/Users/darren.govoni/git/aws-cdk-examples/scheduled-fargate-task/node_modules/aws-cdk-lib/aws-ec2/lib/vpc.js:1:32239)
at new Vpc (/Users/darren.govoni/git/aws-cdk-examples/scheduled-fargate-task/node_modules/aws-cdk-lib/aws-ec2/lib/vpc.js:1:11620)
at new ECSCronTaskStack (/Users/darren.govoni/git/aws-cdk-examples/scheduled-fargate-task/main.ts:13:17)
at Object. (/Users/darren.govoni/git/aws-cdk-examples/scheduled-fargate-task/main.ts:64:1)
at Module._compile (node:internal/modules/cjs/loader:1241:14)
at Module.m._compile (/Users/darren.govoni/.npm/_npx/1bf7c3c15bf47d04/node_modules/ts-node/src/index.ts:1618:23)
at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
at Object.require.extensions. [as .ts] (/Users/darren.govoni/.npm/_npx/1bf7c3c15bf47d04/node_modules/ts-node/src/index.ts:1621:12)
at Module.load (node:internal/modules/cjs/loader:1091:32)
at Function.Module._load (node:internal/modules/cjs/loader:938:12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.