This infrastructure is a simple Flask app that uses DynamoDB for viewer.copc.io state URLs
conda create -n copc-urls -c conda-forge python=3.9 -y
conda env config vars set -n copc-urls AWS_ACCESS_KEY_ID=thekey
conda env config vars set -n copc-urls AWS_SECRET_ACCESS_KEY=thesecret
conda env config vars set -n copc-urls AWS_DEFAULT_REGION=us-west-2
conda activate copc-urls
pip install virtualenv
Create virtual environment
virtualenv venv
Activate virtual environment
source venv/bin/activate
Install dependencies
pip install -r requirements.txt
zappa deploy staging
Staging process will emit logs and give you final APIGW HTTP link you can test against
-
Create an SSL certificate in AWS Certificate Manager and get URN. Paste the certificate's URN and URL into
zappa_settings.json
where appropriate. -
Deploy it
zappa deploy production
# configure SSL configuration
zappa certify production
# Watch logs
zappa tail production
- Visit APIGW and setup CNAME for CloudFront URL in DNS