Coder Social home page Coder Social logo

venkat22 / aws-cdk-examples Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aws-samples/aws-cdk-examples

0.0 0.0 0.0 875 KB

Example projects using the AWS CDK

License: Apache License 2.0

Shell 2.27% Java 21.41% TypeScript 20.70% Python 38.54% Dockerfile 0.24% JavaScript 8.00% HTML 0.24% C# 8.29% Batchfile 0.32%

aws-cdk-examples's Introduction

AWS CDK Examples

This repository contains a set of example projects for the AWS Cloud Development Kit. Some examples are only available in TypeScript, there is a guide on how to read TypeScript code and translate it to Python here.

Table of Contents

  1. TypeScript examples
  2. Java examples
  3. Python examples
  4. JavaScript examples
  5. .NET examples

TypeScript examples

To run a TypeScript example, say my-widget-service:

$ npm install -g aws-cdk
$ cd typescript/my-widget-service
$ npm install
$ npm run build
$ cdk deploy  // Deploys the CloudFormation template

# Afterwards
$ cdk destroy
Example Description
api-cors-lambda-crud-dynamodb Creating a single API with CORS, and five Lambdas doing CRUD operations over a single DynamoDB
application-load-balancer Using an AutoScalingGroup with an Application Load Balancer
appsync-graphql-dynamodb Creating a single GraphQL API with an API Key, and four Resolvers doing CRUD operations over a single DynamoDB
classic-load-balancer Using an AutoScalingGroup with a Classic Load Balancer
custom-resource Shows adding a Custom Resource to your CDK app
elasticbeanstalk Elastic Beanstalk example using L1 with a Blue/Green pipeline (community contributed)
ecs-cluster Provision an ECS Cluster with custom Autoscaling Group configuration
ecs-network-load-balanced-service Starting a container fronted by a network load balancer on ECS
ecs-service-with-task-placement Starting a container ECS with task placement specifications
ecs-service-with-advanced-alb-config Starting a container fronted by a load balancer on ECS with added load balancer configuration
ecs-service-with-task-networking Starting an ECS service with task networking, allowing ingress traffic to the task but blocking for the instance
fargate-application-load-balanced-service Starting a container fronted by an application load balancer on Fargate
fargate-service-with-auto-scaling Starting an ECS service of FARGATE launch type that auto scales based on average CPU Utilization
ecs-cross-stack-load-balancer Shows how to use a single load balancer with services in other stacks
lambda-cron Running a Lambda on a schedule
my-widget-service Use Lambda to serve up widgets
resource-overrides Shows how to override generated CloudFormation code
static-site A static site using CloudFront
stepfunctions-job-poller A simple StepFunctions workflow
ecs-service-with-logging Starting a container fronted by a load balancer on ECS
fargate-service-with-logging Starting a container fronted by a load balancer on Fargate
custom-logical-names Example of how to override logical name allocation

Java examples

To run the Java examples:

$ npm install -g aws-cdk
$ mvn compile
$ cdk deploy

# Afterwards
$ cdk destroy
Example Description
fargate-load-balanced-service Starting a container fronted by a load balancer on Fargate
hello-world A demo application that uses the CDK in Java
lambda-cron Running a Lambda on a schedule
resource-overrides Use of the resource overrides (aka "escape hatch") mechanism.
stepfunctions-job-poller A simple StepFunctions workflow
static-site A static site using CloudFront

Python examples

To run a Python example, say my-widget-service:

$ npm install -g aws-cdk
$ cd python/my-widget-service
$ pip install -r requirements.txt    # Best to do this in a virtualenv
$ cdk deploy                         # Deploys the CloudFormation template

# Afterwards
$ cdk destroy
Example Description
api-cors-lambda Shows creation of Rest API (GW) with an /example GET endpoint, with CORS enabled
application-load-balancer Using an AutoScalingGroup with an Application Load Balancer
appsync-graphql-dynamodb Creating a single GraphQL API with an API Key, and four Resolvers doing CRUD operations over a single DynamoDB
classic-load-balancer Using an AutoScalingGroup with a Classic Load Balancer
custom-resource Shows adding a Custom Resource to your CDK app
dockerized-app Deploys a containerized app into 3 tiers with userdata in an autoscaling group
ecs-cluster Provision an ECS Cluster with custom Autoscaling Group configuration
ecs-load-balanced-service Starting a container fronted by a load balancer on ECS
ecs-service-with-task-placement Starting a container ECS with task placement specifications
ecs-service-with-advanced-alb-config Starting a container fronted by a load balancer on ECS with added load balancer configuration
ecs-service-with-task-networking Starting an ECS service with task networking, allowing ingress traffic to the task but blocking for the instance
fargate-load-balanced-service Starting a container fronted by a load balancer on Fargate
fargate-service-with-autoscaling Starting an ECS service of FARGATE launch type that auto scales based on average CPU Utilization
lambda-cron Running a Lambda on a schedule
lambda-s3-trigger S3 trigger for Lambda
rds Creating a MySQL RDS database inside its dedicated VPC
stepfunctions A simple StepFunctions workflow
url-shortner Demo from the Infrastructure is Code with the AWS CDK AWS Online Tech Talk

JavaScript examples

Select the following link to see how to install and run the example.

Example Description
aws-cdk-changelogs-demo A full serverless Node.js application stack deployed using CDK. It uses AWS Lambda, AWS Fargate, DynamoDB, Elasticache, S3, and CloudFront.

.NET examples

Example Description
my-widget-service Use Lambda to serve up widgets
random-writer This sample application demonstrates some essential mechanisms of the AWS CDK for .NET. It uses AWS Lambda, DynamoDB, CloudWatch.

To run a .NET example, say my-widget-service:

$ npm install -g aws-cdk
$ cd csharp/my-widget-service
$ dotnet build src
$ cdk deploy  // Deploys the CloudFormation template

# Afterwards
$ cdk destroy

License

This library is licensed under the Apache 2.0 License.

aws-cdk-examples's People

Contributors

clareliguori avatar curry9999 avatar dchristian3188 avatar doug-aws avatar efekarakus avatar garnaat avatar iamhopaul123 avatar jigar-lab avatar jpeddicord avatar mrarnoldpalmer avatar nathanpeck avatar ngl321 avatar nija-at avatar nutterzuk avatar orozcoadrian avatar pettitwesley avatar piradeepk avatar rhboyd avatar rix0rrr avatar romainmuller avatar sarveshbhagat avatar scottbrenner avatar shivlaks avatar simalexan avatar skinny85 avatar somanyhs avatar srihariph avatar wingkwong avatar zanhsieh avatar zechariahks avatar

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.