The secrets sample app shows how to use the klotho::persist
annotation to store secrets.
This guide assumes:
make install
make run
Hit your endpoint
curl http://localhost:3000/
# > very secret%
run the terminal commands:
# Compile the app
klotho . --app py-secrets -p aws
## Copy the secret into compiled
cp my_secret.key ./compiled
# Go into the compiled directory
cd compiled
# If you didn't set the aws region as indicated in the compiler output, do that now
pulumi config set aws:region YOUR_REGION -s py-secrets
# npm install
npm install
# Deploy
pulumi up -s py-secrets
# Outputs: {
# apiUrl: 'https://<...>.execute-api.<YOUR_REGION>.amazonaws.com/stage/'
# }
curl https://<...>.execute-api.<YOUR_REGION>.amazonaws.com/stage/
# > very secret
# Tear down when done
pulumi destroy -s py-secrets