-
Install AWS CLI or deploy with ZIP file.
All the not native external dependecies like Cheerio should be uploaded.
Pack everything with
zip -r func.zip .
Upload is under Function Code > Actions.
-
Create a "lambda function". (hehey, I can add a new buzzword to the resume)
-
Create Environment variables (below on the same page where the function editor is)
- MY_EMAIL
- APT_URL
-
In Basic settings increase Timeout - 10 sec is enough (on the same page below)
-
Create IAM user (acc with limited access), IAM policy and assign it to execution role, confirm SES identity - all those to send emails docs
Make sure everything is authorized to run and runs under the same
process.env.AWS_REGION
.It will fail otherwise.
-
Set
testRun
totrue
-
Deploy
&&Test
Make sure emails are not ending up in the Spam folder. (or go and do all the stuff to have valid mail sender)
-
Schedule a test for the function call e.g. "every 5 min"
-
Finally.
-
Make sure everything is working.
-
Set
testRun
tofalse
. Deploy! -
Re-schedule the function call to every 30 min.
-
-
Done.
P.S. They could just allow current residents to apply to waiting lists and I won't have to do all of this.