AWS CDK

AWS CDK

About the Lab

AWS CDK

Stage 1: Introduction to AWS CDK

Stage 2: Setting up an AWS CDK Project

npm install -g aws-cdk
cdk --version
mkdir cdk_project && cd cdk_project
cdk init --sample_app --language python
source .venv/bin/activate
pip install -r requirements.txt

Stage 3: Create AWS Lambda with AWS CDK

mkdir lambda_cdk && cd lambda_cdk
touch lambda_function.py
from datetime import date

def lambda_handler(event, context):

today = date.today()
today = str(today)
print("Today`s date:", today)
return {
`statusCode`: 200
}
cdk diff
cdk deploy

Stage 4: Checking your AWS Lambda

--

--

Full-Stack Data Scientist

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store