cdk-infra
v0.1.5
Published
Simply deploy everything you need for your website (api gateway, S3 static content, authentication, ...)
Readme
Simply deploy everything you need for your website (api gateway, S3 static content, authentication, ...)
AWS CDK Full Stack Infrastructure
Overview
Easily set up a 100% serverless infrastructure on AWS for your website:
- Static content can be public or private
- Lambda backend behind an API Gateway
- Managed authentication with Cognito
- No CORS issues all requests go through the API Gateway
What is a Stack?
A stack is an isolated deployment unit within AWS CDK. Each stack can represent a separate environment such as dev, prod, or a personal developer space like ninja-dev.
You can spawn, update, and destroy stacks independently, making it easy to manage multiple environments with minimal overhead.
Stack Configuration
Each environment is defined as a named context. This allows you to deploy multiple isolated environments under the same domain or subdomains:
{
"context": {
"dev":{
"domainName": "example.com",
"subDomainName": "dev",
"webPrivate": true,
"userPool": true,
"userPoolAutoVerifyMail": true,
"userPoolVerificationEmailSubject": "Welcome to the dev stack",
"userPoolVerificationEmailBody": "Verify your email at {##Verify Email##}"
},
"prod":{
"domainName": "example.com",
"subDomainName": "prod",
<...>
},
"ninja-dev":{
"domainName": "example.com",
"subDomainName": "ninja.dev",
<...>
}
}
}
Install and Usage
npm install cdk-infraDeploy:
cdk deploy -c stack=prod
cdk deploy -c stack=dev