How to stop CloudFront from redirecting to S3 bucket.
I have an Amplify Hosting frontend that uses a rewrite redirect (200) to redirect to an S3 bucket. That worked out fine but then I created a CloudFront distribution and since then, the rewrite gives a timeout after 30 seconds serving a 504 error. That is why I disabled and then deleted the CloudFront distribution. However the timeout and 504 error (coming from CloudFront) is still there. Any ideas how to fully remove this CloudFront forwarding or do I have to delete the bucket/frontend?
Hi there,I understand you want to delete CloudFront distribution because of 504 error you keep on getting.Please correct me if I misunderstood.
To further understand the issue when getting a 504 error or timeout it indicates that when Cloudfront forwarded a request to the origin ,one of the following might have happened: The origin returned an HTTP 504 status code to CloudFront. The origin didn’t respond before the request expired.
Cloudfront will return an HTTP 504 status code if traffic is blocked to the origin by a firewall or security group if the origin isn’t accessible on the internet.Check for these issues first.If access isn’t the problem with your CloudFront check application delays and server timeouts, using link  to help you identify and fix the issue.I would also recommend changing the timeout value to 60 seconds.
However if you no longer want to use a CloudFront distribution, you can delete it by using the CloudFront console or by using the CloudFront API.Please make sure that you have disabled distribution before deleting it.For more instructions on how to delete CloudFront distribution ,use this link for the console  and this link  for the CloudFront API
I hope the above information is helpful.
https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/http-504-gateway-timeout.html#http-504-gateway-timeout-configure-firewall https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/HowToDeleteDistribution.html https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_DeleteDistribution.html
"Bucket name already exists", but it is not listed on the S3 Mgmt Consoleasked 4 years ago
How can I (use AWS GoLang SDK to) create an io.writer (pipe) that will write buffers to a AWS S3 bucket file?asked 3 months ago
Help with S3 redirectAccepted Answerasked 3 months ago
OAI or not OAI for serving a static website in S3 using CloudFrontasked 3 months ago
Redirect S3 URL to Domain URLasked 22 days ago
Static bucket redirect requests append index.html to homepage URLasked 2 years ago
S3 Static Website RoutingRules when using Cloudfront and a domain nameasked 3 years ago
How to stop CloudFront from redirecting to S3 bucket.asked a month ago
Virtual hosting an S3 bucket using Cloudfront + SSLasked 3 years ago
How to Migrate from existing S3 bucket to AWS Amplyasked 2 years ago