cd cdk
npm install
npm run buildBuild the Rust Lambda function in release mode:
cd rust
cargo build --releaseThe binary should appear under target/release. It should be named
bootstrap. Copy it over to the target/cdk/release directory, where CDK will
look into:
mkdir --parents target/cdk/release
cp target/release/bootstrap target/cdk/releaseThe first time you deploy the function, you need to invoke cdk bootstrap.
This is to deploy the CDK toolkit stack into an AWS environment, and has
nothing to do with the fact that our Rust binary is also named bootstrap.
cd cdk
cdk bootstrapTo deploy the Lambda function stack, run this command:
cdk deploy --allTo destroy the stack:
cdk destroy --all