Cloudfront Distribution for AWS Amplify

0

I'm using AWS Amplify to host my react website and is being connected to github repo resulting in automated deployment. I'm using a custom domain to host web app. As per my research till date, AWS uses Cloudfront distribution and S3 bucket to host a web app via amplify. Though AWS does not display either cloudfront distribution or S3 bucket.

Everything seems to be fine until the last few weeks. Suddenly for couple of minutes and sometime hours, AWS is unable to resolve the distribution and results in time out while resolving the domain name of web app and then it resolves own it's own. Frequency of such events has increased a lot in last few days. I've been looking to implement an alternative cloud-front distribution using the amplify hosting which I can switch to once existing distribution stops responding but I could not find many options in AWS cloudfront distribution console.

Another question - How can I avoid a single point of failure where I've to switch the distribution manually? How can I utilize the concept of heartbeat using the AWS infra where I can avoid any downtime.

1 Answer
1

Based on the information in this link (https://stackoverflow.com/questions/71516855/aws-amplify-app-as-cloudfront-distribution-origin) , it appears that you may not be able to use AWS Amplify as an origin for an AWS CloudFront distribution. In a discussion on Stack Overflow, the link says that AWS support confirmed that AWS Amplify cannot be used in front of CloudFront.

However, you can achieve failover configurations using Amazon Route 53's health checking feature. There are two main types of failover configurations: active-active and active-passive.

In the active-active configuration, all the records that have the same name, the same type, and the same routing policy are active unless Route 53 considers them unhealthy. Route 53 can respond to a DNS query using any healthy record​. (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-types.html)

In the active-passive configuration, a primary resource or group of resources is available the majority of the time, with a secondary resource or group of resources on standby. When responding to queries, Route 53 includes only the healthy primary resources. If all the primary resources are unhealthy, Route 53 begins to include only the healthy secondary resources in response to DNS queries​.

You can configure active-passive failover with one primary record and one secondary record, or with multiple primary and secondary resources. You can also use weighted records for active-passive failover, with certain caveats​.

Route 53 is a highly available and scalable Domain Name System (DNS) web service that can perform domain registration, DNS routing, and health checking. It can send automated requests over the internet to a resource, such as a web server, to verify that it's reachable, available, and functional​. https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/Welcome.html

profile picture
EXPERT
answered 10 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions