Giter VIP home page Giter VIP logo

cdk-elasticbeanstalk-examples's Introduction

Welcome to your CDK TypeScript project!

This project harnesses CDK technology (v1.60) for basic VPC, RDS, Elastic Beanstalk, CloudFront with Lambda@Edge stack creation.

To run this, please rename example.env to .env and change the values

Stacks

As you can see in lib/app.ts, some stacks depend on one or more stacks. Elastic Beanstalk Java SE listens to port 5000, not 8080. Please bear this in mind.

VPC

Simple AWS VPC Stack. You might want to change maxAzs and so on for your needs. (Will put this in env file too in the near future)

RDS

Aurora RDS Database cluster. If you wish to use serverless option, please refer aws-rds module. Addtionally, should you wish to change the default database name, please change in the java project and rds-stack.ts (it is set as test)

Elastic Beanstalk

Standard Java SE 11 environment. You need to build your own project and submit jar file OR use the one in demo/target. Should you wish to run this in your local environment, you need your own mysql database running.

CloudFront

Cloudfront creates two origins: s3 for static web hosting and elb from elastic beanstalk. The stack deploys static files from website folder. Please change the url to the cloudfront elb origin

Glue and Athena

CloudFront pushes access logs to s3. Glue and Athena helps the user to pull out useful insights from it without provisioning additional infrastructure

Pipeline

CI/CD CDK pipeline. Simply deploy the stack and git commit push to see if it deploys the stack with changes.

Useful commands

  • npm run build compile typescript to js
  • npm run watch watch for changes and compile
  • npm run test perform the jest unit tests
  • cdk deploy deploy this stack to your default AWS account/region
  • cdk diff compare deployed stack with current state
  • cdk synth emits the synthesized CloudFormation template

How to use this?

  • npm run build && cdk synth && cdk deploy "*" does magic.
  • cdk destroy "*" destroys them.

Should you wish to select which stacks to deploy, please use cdk deploy VpcStack RdsStack ElasticBeanstalkStack and so on.

TODOs

  • Improve overall code quality
  • Find better ways to manage environment variables in both code and cdk projects

Kudos

Spring-Jpa Best Practices for general Spring Best Practices

Complete AWS Elastic Beanstalk Application through CDK (TypeScript) for overall elastic beanstalk CDK

AWS CDK Part 3: How to create an RDS instance for creating Aurora RDS instance using CDK

Multiple Cloudfront Origins with Behavior Path Redirection for awssome CloudFront + Lambda@Edge

Implementing Default Directory Indexes in Amazon S3-backed Amazon CloudFront Origins Using Lambda@Edge for S3 Subdirectory Root Object with CloudFront issue

For Awesome Spring Security form based login tutorials

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.