admin管理员组文章数量:1352795
I have two apps in AWS.
- One hosted in AWS S3 and acts as an origin for an AWS CloudFront distribution.
- Another one hosted in AWS Amplify.
I would like to, based on a specific path, to redirect either to one or the other.
For example, www.domain/users/123
I'd like it to hit the AWS Amplify app. For all the rest, the CloudFront distribution.
I tried doing this with AWS API Gateway and a Lambda attached, but I cannot link the domain to multiple AWS resources.
Is there another way in which I can make this happen?
I have two apps in AWS.
- One hosted in AWS S3 and acts as an origin for an AWS CloudFront distribution.
- Another one hosted in AWS Amplify.
I would like to, based on a specific path, to redirect either to one or the other.
For example, www.domain/users/123
I'd like it to hit the AWS Amplify app. For all the rest, the CloudFront distribution.
I tried doing this with AWS API Gateway and a Lambda attached, but I cannot link the domain to multiple AWS resources.
Is there another way in which I can make this happen?
Share Improve this question asked Apr 2 at 1:57 Felipe PeñaFelipe Peña 2,8484 gold badges24 silver badges41 bronze badges1 Answer
Reset to default 0You can point your domain at your CloudFront distribution then you have 2 origins - one for your S3 app and one pointing to your Amplify app. Make the S3 origin your default behaviour, then add another behaviour for /users/*
(or whatever) and point that at your Amplify origin.
本文标签: amazon web servicesRedirect based on URL to AWS CloudFront or AWS AmplifyStack Overflow
版权声明:本文标题:amazon web services - Redirect based on URL to AWS CloudFront or AWS Amplify - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1743864274a2552296.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论