AWS resources provisioned by using AWS CDK. AWS CDK is a "software development framework for defining cloud infrastructure in code and provisioning it through AWS CloudFormation" aka Infrastructure as Code (IaC).
This is an project template for an app with multiple stacks. It supports:
- Multi regions and multi aws accounts. Prod environment may be deployed to a different AWS (sub) account for higher resource isolation
- With cost optimizations (ex: no NAT Gateways are needed in a test environment as database & applicational layer is public accessible)
- Network stack with public (ex: for load balanceds), private (ex: for servers) and isolated (ex: for databases) subnets
- Compute stack based on latest version of .NET Core on Linux platform for AWS Elastic Beanstalk. Suitable to run Asp.net Core web projects and easily changeable to support a different AWS EB platform
- Database stack AWS RDS Aurora Postgres DB placed in Isolated subnet for production but accessible from application subnet
- Authentication stack for AWS Cognito setup
- Users stack for applicational AWS IAM users (programatic access)
- Storage stack for a single AWS S3 bucket
- Set app:XXX context variables with your own values on
cdk.jsonfile - Rename project name in
package.jsonfile - Create a aws-elasticbeanstalk-ec2-role & aws-elasticbeanstalk-service-role. Tip: AWS EB create those roles automatically if you manually start an example app.
- Bootstrap cdk. The
cdk.jsonfile tells the CDK Toolkit how to execute your app.
npm run buildcompile typescript to jsnpm run watchwatch for changes and compilenpm run testperform the jest unit testscdk deploydeploy this stack to your default AWS account/regioncdk diffcompare deployed stack with current statecdk synthemits the synthesized CloudFormation template