This module is to provide an API in AWS. The module includes the following:
- API gateway
- Lambda
- Cloudwatch logs
- IAM roles and policies for this infrastructure
The following items may be added to this at a later date:
- Implement hosted zones to ensure API has a consistent location.
- Implement CORS - can use the hosted zone from above to achieve this.
- Implement Cognito User Pools
Clone the repository
git clone https://github.com/nhs-england-tools/terraform-aws-api-bootstrap.git
cd nhs-england-tools/terraform-aws-api-bootstrap
This module can be called by including the following:
module "get_method_api" {
source = "github.com/nhs-england-tools/terraform-aws-api-bootstrap//terraform?ref=20231002"
aws_region = "eu-west-2"
project_name = "my_get_method_api1"
lambda_function_name = "my_get_method_lambda1"
lambda_zip_file = data.archive_file.lambda_1.output_path
lambda_handler = "handler.lambda_handler"
}
data "archive_file" "lambda_1" {
type = "zip"
source_dir = "${path.module}/files/lambda1/hello_world"
output_path = "${path.module}/lambda_archive/hello_world.zip"
}
Provide a way to contact the owners of this project. It can be a team, an individual or information on the means of getting in touch via active communication channels, e.g. opening a GitHub discussion, raising an issue, etc.
Unless stated otherwise, the codebase is released under the MIT License. This covers both the codebase and any sample code in the documentation.
Any HTML or Markdown documentation is © Crown Copyright and available under the terms of the Open Government Licence v3.0.