This is an OpenSource project that generates APIs using Terraform and AWS.
This project is still very much a Work In Progress.
- nodejs
- npm
- yeoman
- Install Yeoman
- Clone this repository
- NPM link this repository
npm install yo --global
git clone git@github.com:BurendoUK/generator-aws-api.git
cd generator-aws-api.git
npm install
npm run build
npm run link
yo aws-api:app
yo aws-api:<command>
-
app
Initialise the application.
yo aws-api:app -
APIs
-
api
Create a new API
yo aws-api:api -
api-resource
Add a Resource (pathpart) to an API
yo aws-api:api-resource -
api-method
Add a Lambda to handle a method (GET, POST, etc.) for a Resource
yo aws-api:api-method -
api-swagger
Generate an entire API from a swagger definition.
yo aws-api:api-swagger -
api-dns
Create a Custom domain for an API. Requires a
dns(below) entry has been completed. This will also create the associated certificate.yo aws-api:api-dns
-
-
Storage
-
dynamodb
Create a dynamodb and associated read/write policies. Reminder: tables should be encrypted at rest by default so ensure you've created a KMS key first.
yo aws-api:dynamodb -
s3
Create an s3 bucket and associated read/write policies. Reminder: buckets should be encrypted at rest by default so ensure you've created a KMS key first.
yo aws-api:s3 -
kms
Create a KMS key and associated read/write policies.
yo aws-api:kms
-
-
Networking
-
dns
Create a route53 hosted zone.
yo aws-api:dns -
vpc
Create a simple VPC.
yo aws-api:vpc -
subnet
Create a standard set of public/private subnets, along with internet gateway and/or net gateways.
yo aws-api:subnet
-
-
Event Bus
-
eventbus
Create an AWS eventbus.
yo aws-api:eventbus -
eventbus-rule
Create a rule and lambda for an AWS eventbus.
yo aws-api:eventbus-rule
-