I have outlined the overall “project” and here is my notes on the RDS + VPC challange: Setting up RDS (and VPC) via CloudFormation The Serverless Framework has fields to include verbatim CloudFormation template data - but I found myself unable to figure out how to get the resulting connection information into my lambda function without running CloudFormation api calls to get outputs of a given CloudFormation stack either as plugin that repackages the zipfile of the lambda after the CloudFormation stack has executed or as seperate standalone stack where values are then available when the serverless framework deploys.
I have outlined the overall “project” and here is my notes on the psycopg2 challenge: Installing Psycopg and setting up logging In general - you need to include all dependencies when deploying the Lambda. I decided on an approach that included a “vendored” directory and do sys.path mangling. . ├── content │ ├── common.py │ ├── __init__.py │ └── import.py ├── database -> ../database ├── handler.py ├── __init__.py ├── lambdahelper.
I’ve been playing around with the Serverless Framework for setting up a simple API which fetches either one piece of data from a database or a list of things. Setup I decided on using Amazon RDS PostgreSQL as the database and figured that would be a pretty standard thing to do but within the Serverless framework it’s apparently not done that often. AWS has got a tutorial so it’s not completely impossible.