omerkarabacak / multi-stack-aws-cdk-python-iac-project

Multi-Stack AWS CDK Infrastructure Project for Serverless and Container Projects

Home Page:https://omerkarabacak.medium.com/how-to-create-a-multiple-stacks-aws-cdk-python-infrastructure-as-code-iac-project-e8a8defcd209

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multi-Stack AWS CDK Infrastructure as Code Project for Serverless and Container Projects

This project is an infrastructure as code (IaC) project for a serverless app and an ECS based container project

Application Repositories

How to run this AWS CDK Project

Install CDK CLI tool

npm install -g aws-cdk

How to create virtual environment for Python and install dependencies

python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

How to run tests

pytest

Show stacks

cdk ls

How to deploy a selected stack

cdk deploy lambda-stack --profile <AWS_PROFILE_NAME>

How to deploy all stacks

cdk deploy --all --profile <AWS_PROFILE_NAME>

Useful commands

  • cdk ls list all stacks in the app
  • cdk synth emits the synthesized CloudFormation template
  • cdk deploy deploy this stack to your default AWS account/region
  • cdk diff compare deployed stack with current state
  • cdk docs open CDK documentation

About

Multi-Stack AWS CDK Infrastructure Project for Serverless and Container Projects

https://omerkarabacak.medium.com/how-to-create-a-multiple-stacks-aws-cdk-python-infrastructure-as-code-iac-project-e8a8defcd209


Languages

Language:Python 93.3%Language:Batchfile 6.7%