Using AWS Lambda to Perform a 302 Redirect From CloudFront
HTML-код
- Опубликовано: 8 сен 2024
- The Aither Labs team demonstrates how you can use AWS Lambda and CloudFront to perform a serverless 302 redirect from one specific URL to another specific URL on a different DNS.
Open source code is available here: github.com/Ait...
www.aithertechnology.com
I am getting 503 ERROR . The request could not be satisfied.
The Lambda function associated with the CloudFront distribution is invalid or doesn't have the required permissions. We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner. If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation when I enter the url. Any idea how to fix it?
Two things to check: First, verify your Lambda function runs correctly on its own. It should not need any additional permissions besides the default execution role. But you want to make sure it is returning the correct response. Second, verify that you have deployed the function to Lambda @Edge and that you have specified the correct ARN in the correct event ("Origin request") in the Behaviors tab of the Distribution.
@@nicholaswalker7324 Thank you😄
Great video