- S3
- SNS
- Lambda
- Step Functions
- FSx for Lustre
- CloudWatch Alarms
This example demonstrates the following concepts:
- Chaining AWS Services using CDK
- Disconnected Event Notifications and Handling
- Creation of resilient storage to attach
- Asynchronous processing of request
- Leveraging Serverless compute to perform a workflow
- Scalable, Serverless Architecture
To deploy this CDK Application you will need the following
- Python 3.9+
- CDK v2.x
- AWS CLI v2.x
- Poetry
- Docker (for building the lambda functions)
- An AWS profile with valid IAM credentials
Note: A Makefile
is included in this project to wrap commands.
You can review the available commands using make help
The cdk.json
file tells the CDK Toolkit how to execute your app.
This project utilizes python and poetry. It assumes that these 2 pre-requisites are installed.
NOTE: In app.py
, you will need to replace <SOME VPC ID>
with an AWS VPC ID to be able to deploy.
NOTE: In app.py
, you will need to replace <SOME SUBNET ID>
with an AWS SUBNET ID to be able to deploy.
To initialize the environment to run this sample:
$ make init
It is also necessary to have an AWS Account Region that is bootstrapped to run CDK.
$ make bootstrap
NOTE: To add additional dependencies, for example other CDK libraries, you will need to run a poetry
command.
$ poetry add <package_name>
At this point you can now synthesize the CloudFormation template for this code.
$ make synth
Now you can deploy the CloudFormation to AWS.
$ make deploy
You can now begin exploring the source code, contained in the directory.
To run the Step Function deployed with this stack, you can simply invoke it directly. It does not require any special inputs and will complete after provisioning is completed.
Finally, to cleanup and remove the stack from the AWS account you can run the command below. NOTE: If you have invoked the Step Function to create an FSx for Lustre filesystem, you will need to delete those filesystems prior to running the teardown of the stack.
make teardown
There are basic unit tests included that can be run using the following command:
$ make test
Unit Tests for this project are located in the tests\unit
folder
If you wish to run these ny of the following commands for this project
you will need to prefix them with poetry run <command>
.
cdk ls
list all stacks in the appcdk synth
emits the synthesized CloudFormation templatecdk deploy
deploy this stack to your default AWS account/regioncdk diff
compare deployed stack with current statecdk docs
open CDK documentation
See CONTRIBUTING for more information.
This library is licensed under the MIT-0 License. See the LICENSE file.