Powr serverless microservices
We will be using Serverless to create, deploy and mantain our microservices. This uses combination of AWS Lamda, AWS API Gateway and can listen to AWS Infractures events and callbacks.
Instructions​
Installation and configuration​
~> npm -g i serverless
~> git clone https://github.com/superpowr/Serverless.git
~> cd Serverless
~> cp Template MicroService # name of your microservice. Eg. MJML, ImageResizer
~> cd MicroService
~> npm install
~> serverless login #follow the instructions
~> serverless run
Deploy​
Before you deploy please make sure to export AWS key and secrets.
Example
serverless config credentials --provider aws --key XXXXXXXXXX --secret XXXXXXXXXX
# staging
~> serverless deploy --stage staging
# production
~> serverless deploy --stage production
Resources​
The functions may not always be under the region you are checking, so check other regions eg: https://console.aws.amazon.com/lambda/home?region=us-east-1#/functions