Skip to content
This repository has been archived by the owner on Sep 7, 2022. It is now read-only.

Latest commit

 

History

History
39 lines (25 loc) · 1.15 KB

README.md

File metadata and controls

39 lines (25 loc) · 1.15 KB

Amazon RDS Proxy Demo Code

This code accompanies the Amazon RDS Proxy Demo video.

Demo

Files

  • index.js - The Lambda function shown in the demo video. This Lambda provides the application logic for the API presented in the demo.

Notes

  • The Lambda function relies on the following environment variables to be defined:

    • database
    • user
    • proxyendpoint
    • port
    • region
  • The code in the Lambda function does a query against a table named contacts in the database. It is expected the schema of this table has two columns as below:

email	varchar(255)
name	varchar(255)

MySQL Client Installation

You will need to package the mysql2 client library with your Lambda function. First, install the mysql2 client:

npm install –save mysql2

and then package the directory as described in AWS Lambda Deployment Package in Node.js.

Acknowlegements

The MySQL client linked in this sample is the mysql2 client.