Claudia has lots of options to customise deployments. You can configure the function name, reserved memory, timeouts and a lot more by providing additional options to the claudia create
command. To get a full list of supported options, check out the Claudia Create Docs or run:
claudia create --help
Check out these tutorials for information on customising deployments:
- Selecting and excluding files from your package
- Using local NPM modules
- Using different versions for development, testing and production
Claudia can create an API Gateway definition, wire up integration templates and even simplify routing so that a single Lambda function can handle multiple web API URLs. For that, create a WEB API module using the Claudia API Builder and supply the routing module name instead of a handler to create the project:
claudia create --name LAMBDA_NAME --region AWS_REGION --api-module ROUTING_MODULE
See the Web Api Example Project for a trivial example of how to wire up a single lambda to multiple HTTP paths.
Claudia can also work with objects you've already created in AWS. In order to connect correctly to the resources, you'll need to
create a claudia.json
file in the root directory of your Node.js project, and set the following parameters:
lambda
: required, an object containing the following propertiesname
: lambda function namerole
: primary IAM security role that is assumed by the lambda functionregion
: AWS region where the function is defined
api
: (optional) API Gateway REST API detailsid
: REST API Idmodule
: the module that contains the API definition
{
"lambda": {
"name": "hello-world",
"role": "hello-world-executor",
"region": "us-east-1"
},
"api": {
"id": "25628xa",
"module": "web"
}
}