Skip to content

wbattou/edge-api-gateway-custom-domain

Repository files navigation

AWS API Gateway @EDGE with custom domain name

This pattern provides a simple stack (API Gateway /hello) to deploy an EDGE-Optimized API Gateway in your preferred region with ACM certificate in us-east-1(mandatory with EDGE API).

Requirements

Deployment Instructions

  1. Create the certificate in us-east-1
    $ sam deploy -t certificate.yaml --stack-name cert-sample-api --parameter-overrides "Domain=sample.com" --region us-east-1 --resolve-s3 --capabilities CAPABILITY_IAM --no-fail-on-empty-changeset --no-progressbar
    
  2. Create the main stack in your preferred region
    $ sam deploy -t template.yaml --stack-name sample-api --parameter-overrides "Env=Dev Domain=sample.com" --region eu-west-1 --resolve-s3 --capabilities CAPABILITY_NAMED_IAM --no-fail-on-empty-changeset --no-progressbar
    

How it works

image

Testing

$ wget sample-api.<your-domain-name>/hello

Cleanup

  1. Delete the stack
    $ sam delete --stack-name sample-api --region eu-west-1
    $ sam delete --stack-name cert-sample-api --region us-east-1
    

Copyright 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.

SPDX-License-Identifier: MIT-0

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages