2.5.6 • Published 3 years ago
@dvargas92495/aws-serverless-backend v2.5.6
aws-serverless-backend
Creates an api gateway with each route connected to a separate lambda.
Features
- Creates an api gateway with all the requisite resources based on the paths provided
- Every method is mapped to its own Lambda
- An IAM user named like
api_name-lambdais created that is given deployment access to the lambdas - Currently only supports resources one path deep
Usage
provider "aws" {
region = "us-east-1"
}
module "aws_serverless_backend" {
source = "dvargas92495/serverless-backend/aws"
api_name = "example"
paths = [
"resource/get",
"another_resource/post"
]
domain = "example.com"
}Inputs
api_nameis name given to the api.pathsare the list of paths the API supports. By default, it will read thefunctionsdirectory.tagsare a map of tags to add to all resources. By default, it includes 1 Application tag mapping to theapi_name.domainis the domain that the api will be mapped to. By default, it will use tha API name, remapping-to..
Output
rest_api_idthe id of the created rest apiaccess_keythe AWS_ACCESS_KEY_ID of the created usersecret_keythe AWS_SECRET_ACCESS_KEY of the created user