Lambda API for the Call for Papers of the GambiConf conference.
For now this project only covers adding proposals, it will support editing them later.
Once an user wants to apply for talking at the conference, they will open this web page, and it will hit the main handler in handler.js.
The contents of the form will be sent to it, and be validated that they conform to a specific structure/spec. That being correct, the handler will add the talk submission to a row in a Google Spreadsheet. To finish it's execution, it will send an e-mail of confirmation to who applied the talk.
The current dependencies we have are:
- AWS Lambda for running the handler;
- GCP for the spreadsheet;
- AWS SES for e-mail.
- First you'll need to have an AWS account, if you don't it's pretty straight forward to create one;
- Create a group in the IAM page with these permissions:
- AmazonSQSFullAccess;
- AmazonSESFullAccess;
- AWSLambda_FullAccess;
- AmazonS3FullAccess;
- AWSCloudFormationFullAccess;
- IAMFullAccess;
- AmazonAPIGatewayAdministrator;
- CloudWatchFullAccess.
- Then an user attached to this group which you can generate "Access keys" from it;
- Put the credentials in the
.env
file; - Finally you can create a verified identity in SES here, which will be the e-mail used for sending the confirmation to who applied the talk.
- You'll need to have an account in GCP.
- Create a GCP project;
- Go to "APIs & Services" > "Library" then search for "Google Sheets API" or go to this URL (this link might fail if you have multiple google accounts and/or projects in GCP). Then enable this API for your account/project;
- Then you can create a service account that will access the spreadsheet (in the credentials tab at the Google Sheets API page);
- Choose whatever name fits best;
- Add the "Editor" role and finish it.
- Go to the new service account page, then create JSON keys for it;
- You can move this file to the
cfp-api
folder, renaming it toclient_secret.json
; - Create a spreadsheet on Google Sheets with this content as the first line
name title description duration format bio social email
, and the name of the Sheet in the bottom left of the page should beCFP
; - Then you should share this spreadsheet with the e-mail created by the new service account (Editor permission!);
- Finally copy the spreadsheet ID in the URL, eg:
1BSANxGdLChMVWYL7k8sDj0ekRQGrwWDEHdeFctiLZRo
, and change the environment variable.
Once you have AWS and GCP set up, you can run npm run example
, that should send an e-mail and append a line to the spreadsheet ID defined.
For the first time, you'll need to create the whole AWS infrastructure by running:
npm run deploy:all
After that, futher updates on the lambda can be deployed by running:
npm run deploy:funcions