Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Amazon API Gateway GeoLocation REST API Disaster Recovery #2394

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Umang071
Copy link

Issue #, if available:

*Description of changes: We have deployed a pattern that helps customer to deploy resources for Disaster Recovery in API Gateway.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@julianwood julianwood self-assigned this Jul 25, 2024
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file is syntactically incorrect, and e.g. introBox property is missing.
See here for a reference: https://github.com/aws-samples/serverless-patterns/tree/main/_pattern-model

@@ -0,0 +1,128 @@
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: Serverless patterns - Amazon API Gateway Custom Domain Name (uksb-1tthgi812) (tag:apigw-custom-domain-regional)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Description: Serverless patterns - Amazon API Gateway Custom Domain Name (uksb-1tthgi812) (tag:apigw-custom-domain-regional)
Description: This SAM template deploys an API Gateway with a custom domain name and configures failover and geo-location routing.

EnableSNI: true
FullyQualifiedDomainName: !Sub ${ApiRegional}.execute-api.${AWS::Region}.amazonaws.com
Type: HTTPS
FailureThreshold: 3 ## Default is 3
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
FailureThreshold: 3 ## Default is 3

@@ -0,0 +1,129 @@
# Amazon API Gateway GeoLocation REST API Disaster Recovery
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Amazon API Gateway GeoLocation REST API Disaster Recovery
# Multi-Region Disaster Recovery for Amazon API Gateway and AWS Lambda

@@ -0,0 +1,129 @@
# Amazon API Gateway GeoLocation REST API Disaster Recovery

Customers often want to access the resources from the same country where user resides and this pattern will help them to achieve the same. This demo also demonstrates an Amazon API Gateway multi-region active-passive public API that proxies two independent multi-region active-passive Lambda function.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Customers often want to access the resources from the same country where user resides and this pattern will help them to achieve the same. This demo also demonstrates an Amazon API Gateway multi-region active-passive public API that proxies two independent multi-region active-passive Lambda function.
This serverless application demonstrates a disaster recovery solution for Amazon API Gateway and AWS Lambda across multiple AWS regions. It showcases an active-passive setup where API Gateway and Lambda functions are deployed in two separate regions. In the event of a regional outage or disruption in the primary region, the application automatically fails over to the secondary region, ensuring continued availability and minimizing downtime.


3. This example demonstrates the failover only and does not encompass authentication and data for the multiple regions.

Testing
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Testing
# Testing

{"message" : "Hello World! This is the regional API"}
```

You should see a response similar to when request made from the same country as GeoLocation:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate or something missing, no different command executed

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please improve on the testing part and provide an example on how to verify the failover is working.


Important: this application uses various AWS services and there are costs associated with these services after the Free Tier usage - please see the AWS Pricing page for details. You are responsible for any AWS costs incurred. No warranty is implied in this example.

# Requirements
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should add required AWS resources here as well (domain, certificate)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants