Updated readme with new instructions on utilizing serverless IaC to build and deploy, updated pygeo config, updated serverless config so wsgi builds correctly

This commit is contained in:
christophersbarrett
2021-01-11 15:08:44 -08:00
parent fc6fd9d86f
commit f0f421d6ae
3 changed files with 33 additions and 11 deletions
+16 -1
View File
@@ -36,14 +36,23 @@ zappa undeploy -s zappa_settings.json
## node/serverless
The included `serverless.yml` and `pygeoapi-serverless-config.yml` can be used to deploy pygeoapi
on AWS Lambda Serverless Environment.
on AWS Lambda Serverless Environment.
This requires Amazon Credentials and the Serverless deployment tool.
AWS Credentials can be created following the instructions at https://serverless.com/framework/docs/providers/aws/guide/credentials/
Move serverless configs to root directory:
```bash
mv serverless.yml ..
mv pygeoapi-server-config.yml ..
cd ..
```
To install the Serverless environment
```bash
npm install serverless
```
@@ -55,6 +64,12 @@ serverless plugin install -n serverless-python-requirements
serverless plugin install -n serverless-wsgi
```
To test the application as a lambda locally:
```bash
serverless wsgi server
```
To deploy to AWS Lambda:
```bash