MIT License
This template tries to demonstrate a complete microservice that uses AWS services to create a simple serverless API. It uses CloudFormation to create the following and relate all of them to one another as needed:
Because it can be really tough getting all of this set up on your own. There are a number of examples of individual pieces, but I couldn't find examples of how to wire all of them together.
The goal of this repo is that you can have a single repo that contains the Lambda code for the service, as well as the configuration for provisioning the service. The hope is that you could add automated unit testing, and if that passed, the same repo could build your dev environment, potentially run integration tests, and then either automatically or manually deploy the API. Automating all of this will greatly simplify things if your desire is to build self-contained serverless microservices.
cloudformation/sample-params.json
to cloudformation/api-params.json
.cloudformation/api-params.json
to fill in your own values.aws cloudformation create-stack --stack-name <YOURSTACKNAME-CAN-BE-ANYTHING> \
--template-body file://./cloudformation/complete-api.template \
--parameters=file://./cloudformation/api-params.json \
--capabilities CAPABILITY_IAM
If you want to monitor the status of your stack creation on the CLI, you can use this command:
aws cloudformation describe-stacks --query='Stacks[*].{ Name: StackName, Status: StackStatus }'
This software is released under the MIT license. See the license file for more details.
Feel free to take the template and modify it for your own use.
At this point I don't have my normal jshint, jscs, Travis CI stack integrated in this repo. I also don't have unit testing - something I hope to add in the future. So, I don't have a way you can automatically validate your contributions. That said, if you want to contribute, please submit a pull request, but only after doing the following: