Lambda function for creating MailChimp subscriptions with email, first name, and last name.
Create a .env file and set your MailChimp API key, List ID, and username. See .env.example
For reference, here is the MailChimp API documentation.
To create your zip archive, run the following npm script:
$ npm run zip
Integrate with the AWS API Gateway to access the function via HTTP POST:
$ curl -X POST -H "Content-Type: application/json" \
-d '{ "email": "example@gmail.com", "firstName": "Bruce", "lastName": "Wayne" }' \
API_GATEWAY_URL