Skip to content

Files

apigw-custom-domain

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
May 10, 2023
Jun 10, 2024
Jun 10, 2024
Feb 27, 2022
Jun 10, 2024
Jun 10, 2024
Jun 10, 2024
Jun 10, 2024

API Gateway with Custom Domains

Key Value
Environment LocalStack
Services API Gateway, Lambda, Route53, ACM
Integrations Serverless Framework
Categories Serverless; REST API

Introduction

A demo application showcasing API Gateway (v2) endpoints with custom domain names configured through Route53 and ACM, deployed locally using LocalStack and the Serverless framework. For more details, refer to the documentation.

Under the hood, the Serverless framework uses the serverless-localstack plugin to deploy the application to LocalStack. The plugin is configured in the serverless.yml file to use the LocalStack endpoint and the custom domain name.

Prerequisites

Check prerequisites

make check

Installation

make install

Start LocalStack

make start

Deploy the Application

make deploy

The script:

  • Generates an SSL certificate for local testing using openssl.
  • Uses a predefined certificate if openssl is unavailable.
  • Adds the certificate to Amazon Certificate Manager (ACM).
  • Creates a Route53 hosted zone for test.example.com.
  • Displays deployment logs of the Serverless application in the output section.
  • Showcases API Gateway endpoints and custom domain configuration.

Run the application

make run

License

This code is available under the Apache 2.0 license.