Skip to content

Latest commit

 

History

History
63 lines (45 loc) · 2.16 KB

README.md

File metadata and controls

63 lines (45 loc) · 2.16 KB

terraform-aws-api-bootstrap

This module is to provide an API in AWS. The module includes the following:

  1. API gateway
  2. Lambda
  3. Cloudwatch logs
  4. IAM roles and policies for this infrastructure

The following items may be added to this at a later date:

  1. Implement hosted zones to ensure API has a consistent location.
  2. Implement CORS - can use the hosted zone from above to achieve this.
  3. Implement Cognito User Pools

Table of Contents

Setup

Clone the repository

git clone https://github.com/nhs-england-tools/terraform-aws-api-bootstrap.git
cd nhs-england-tools/terraform-aws-api-bootstrap

Usage

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"
}

Contacts

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.

Licence

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.