- Node.js can be installed using nvm
- Serverless installed locally :
npm i -g serverless
- an AWS account : AWS Console
- a Segment account : Segment
- install the project
npm install
- Update
.env
file and add fill theSEGMENT_TOKEN
variable with your token. - Create an aws access key
- Configure your aws credentials locally :
- using aws cli : https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html
- using serverless :
serverless config credentials --provider aws --key <key> --secret <secret>
make deploy
It will build the application and push it on AWS using serverless (see Makefile)
The use case is about to consume SQS messages in order to send Segment's notifications.
Once the application is deployed on AWS, use the console in order to manually post a message into the SQS queue with this content :
{
"EventName": "Awesome event",
"userId": 1234
}