aws-cdk-examples icon indicating copy to clipboard operation
aws-cdk-examples copied to clipboard

feat(typescript): Add new CDK example demonstrating AWS CodePipeline based CICD setup for ECS-Fargate and Lambda for code sourced from Github

Open nimblewish opened this issue 2 years ago • 1 comments
trafficstars

Describe the feature

A CDK example demonstrating AWS CodePipeline based CICD setup for ECS-Fargate and Lambda for code sourced from Github.

Use Case

Start-ups typically begin with a monolithic design running on bare-bones EC2. After a certain scale they try to move to Cloud-native solutions on AWS. Currently there is no readily available solution for this problem. This CDK package serves as the production-grade template/boilerplate required to setup resources required to enable this smoothly.

Proposed Solution

A CDK package that serves as the production-grade template/boilerplate required to setup following resources on a high-level:

  1. CICD pipeline using AWS CodePipeline
  2. Lambdas (both - async triggered and rest endpoint behind API-GW)
  3. ECS Fargate based service. Source code lies in a private Github repo - it is pulled, containerised using docker and image is pushed to an ECR repo. ECS Service deploys the latest built image.
  4. Referencing manually created VPCs, and RDS instances
  5. Secrets stored in AWS SecretManager
  6. Cloudwatch Dashboards, Metrics and Alarms
  7. SQS, SNS, EventBridge (MessageBus, Rules, and Targets)

The code is neatly organised into various stacks on basis of the class of services they create which makes it easy to remove whatever infrastructure isn't needed. For instance - you can comment out the stack instantiation from lib/pipeline-stage.ts.

There are six stacks -

  1. VpcStack - for network infra related resources
  2. DataStoresStack - for databases
  3. PubSubStack - for events based infra
  4. AsyncLambdasStack - async triggered lambdas
  5. LambdaApisStack - lambdas as rest endpoints behind API Gateway
  6. EcsFargateStack - ECS Fargate Service, Cluster, Tasks and Containers.

Other Information

Refer to README.md for Dev Guide.

Acknowledgements

  • [X] I may be able to implement this feature request
  • [ ] This feature might incur a breaking change

Language

Typescript

nimblewish avatar Mar 23 '23 17:03 nimblewish

I am working on this FR

mrlikl avatar May 30 '24 15:05 mrlikl

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.

github-actions[bot] avatar Sep 17 '24 20:09 github-actions[bot]