Easy Deploy Lambda, API and Cloudwatch
Explore the docs »
Report Bug
·
Request Feature
- Table of Contents
- About The Project
- Getting Started
- Usage
- Requirements
- Providers
- Modules
- Resources
- Inputs
- Outputs
- Costs
- Roadmap
- Contributing
- License
- Contact
- Acknowledgements
The main purpose of this terraform module is to deploy an easy Lambda function with API trigger and Cloudwatch logging for both Lambda and API Getway.
- Terraform
- AWS
- Lambda
- Cloudwatch
- API Gateway
- None
module "example" {
source = "git::https://github.com/stiliajohny/terraform-module-aws-lambda-api-cloudwatch.git?ref=master"
lambda_app_name = "example_name"
lambda_filename = "example_code.py"
api_gw_route_key = "$default"
lambda_handler = "my_code_method.lambda_handler"
}
Terraform-docs Output
No requirements.
Name | Version |
---|---|
archive | 2.2.0 |
aws | 3.70.0 |
No modules.
Name | Type |
---|---|
aws_apigatewayv2_api.my-slack_event_handler | resource |
aws_apigatewayv2_integration.my-slack_event_handler | resource |
aws_apigatewayv2_route.my-slack_event_handler | resource |
aws_apigatewayv2_stage.my-slack_event_handler | resource |
aws_cloudwatch_log_group.my-slack_event_handler_api_gw | resource |
aws_cloudwatch_log_group.my-slack_event_handler_lambda | resource |
aws_iam_role_policy_attachment.lambda_policy | resource |
aws_lambda_function.my-slack_event_handler | resource |
aws_lambda_permission.my-slack_event_handler | resource |
archive_file.zip | data source |
aws_iam_role.iam_for_lambda | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
api_gw_integration_methode | The integration methode for the API Gateway. | string |
"POST" |
no |
api_gw_integration_type | The integration type for the API Gateway. | string |
"AWS_PROXY" |
no |
api_gw_protocol_type | The protocol type for the API Gateway. | string |
"HTTP" |
no |
api_gw_route_key | The route key for the route. For HTTP APIs, the route key can be either $default , or a combination of an HTTP method and resource path, for example, GET /pets . |
string |
"$default" |
no |
aws_region | The AWS region to create things in. | string |
"us-east-1" |
no |
cloudwatch_log_retention_days | The number of days to retain logs in CloudWatch. | number |
14 |
no |
lambda_app_description | The description of the Lambda function. | string |
"A simple Lambda function that says hello." |
no |
lambda_app_name | The name of the Lambda function. | string |
n/a | yes |
lambda_architecture | The architecture of the lambda function | list(any) |
[ |
no |
lambda_env_variables | The environment variables to pass to the Lambda function. | map(string) |
{ |
no |
lambda_filename | The name of the Lambda function's file. | string |
n/a | yes |
lambda_handler | The name of the Lambda function's handler. | string |
n/a | yes |
lambda_memory_size | The amount of memory to allocate to the lambda function | number |
128 |
no |
lambda_runtime | The runtime to use for the Lambda function. | string |
"python3.9" |
no |
tags | (Optional) A mapping of tags to assign to the bucket. | map(any) |
{} |
no |
Name | Description |
---|---|
api_base_url | Base URL for API Gateway stage. |
iam_for_lamda | The name of the savings_plan_utilization budget |
lambda_function_name | Name of the Lambda function. |
You can use the tool infracost to see an estimate how much the deployment of resources might cost depending on the usage.
The tool can be installed via this doc
After that you can issue the command:
infracost.exe breakdown --path . --show-skipped
See the open issues for a list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the GPLv3 License. See LICENSE
for more information.
John Stilia - stilia.johny@gmail.com