├── infrastructure-dotnet # Infrastructure code via CDK (NET8).
│ ├── src #
| | ├── Infrastruture # CDK App - Deploys the stacks
| | | ├── Dockerfile # Dockerfile containing the build container definition
└─────── ... # Lambda handler implementations
This project contains the C# version for both infrastructure and lambda handlers. While the CDK project uses dotnetcore3.1, the Lambda handlers are using and running in a NET8 environment. The Lambda build happens in a Docker container, and generates a single executable (bootstrap) that runs in a custom lambda runtime.
The cdk.json
file tells the CDK Toolkit how to execute your app.
- Bootstrap your AWS account as it's required for the automated Docker image build and deployment
cdk bootstrap aws://{ACCOUNT_ID}/{REGION}
- Synthesize the cdk stack to emits the synthesized CloudFormation template. Set up will make sure to build and package the lambda functions residing in the handlers directory.
cdk synth
- Deploy the CDK application
cdk deploy --all
It uses the .NET Core CLI to compile and execute your project.
dotnet build src
compile this appcdk deploy
deploy this stack to your default AWS account/regioncdk diff
compare deployed stack with current statecdk synth
emits the synthesized CloudFormation template