Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Secrets Sample App

The secrets sample app shows how to use the klotho::persist annotation to store secrets.

Prerequisites

This guide assumes:

Run the app locally

make install
make run

Hit your endpoint

curl http://localhost:3000/
# > very secret%

Compile and Deploy with Klotho

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/'
# }

Calling your service

curl https://<...>.execute-api.<YOUR_REGION>.amazonaws.com/stage/
# > very secret

Clean Up

# Tear down when done
pulumi destroy -s py-secrets