This is a stable example. It should successfully build out of the box
This example is built on Construct Libraries marked "Stable" and does not have any infrastructure prerequisites to build.
This example creates a new lambda function that executes every day at 6pm UTC, as dictated by a cron scheduled event.
To build this app, you need to be in this example's root folder. Then run the following:
$ python3 -m venv .env
$ source .env/bin/activate
$ pip install -r requirements.txt
This will install the necessary CDK, then this example's dependencies, and then build your Python files and your CloudFormation template.
Install the latest version of the AWS CDK CLI:
$ npm i -g aws-cdk
You can then run the test suite with one of the following two options:
pytest test_lambda-cron.py
python -m pytest test_lambda-cron.py
Run cdk deploy
. This will deploy / redeploy your Stack to your AWS Account.
After the deployment you will see the API's URL, which represents the url you can then use.
To see the Cloudformation template generated by the CDK, run cdk synth
, then check the output file in the "cdk.out" directory.