cd cdk
npm install
npm run build
Build the Rust Lambda function in release mode:
cd rust
cargo build --release
The 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/release
The 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 bootstrap
To deploy the Lambda function stack, run this command:
cdk deploy --all
To destroy the stack:
cdk destroy --all