jangolano / kotlin-example

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sample Kotlin Lambda using the AWS CDK

This is a simple lambda function that makes use of the AWS CDK to deploy. This is an example project that can be built upon.

Directory Structure

├── application           # Directory which holds the application code
├── buildSrc              # The common gradle conventions for the project
├── gradle                # Gradle Wrapper
└── infrastructure        # Infrastructure Code

Building the Lambda

./gradlew shadowJar

Deploying the Lambda

First the CDK needs to be bootstrapped

cd infrastructure && cdk bootsrtap

If you run synth you can make sure that a cloudformation template can be generated.

cd infrastructure && cdk synth && cd ..

To deploy the application run cdk deploy

cd infrastructure && cdk deploy && cd ..

About


Languages

Language:Kotlin 100.0%