* Please describe which feature you have a question about? *
Since AWS Amplify already uses CloudFront. Why isn't there an option to restrict web apps under the Amplify console?
* Provide additional details*
Is it even possible? If yes, how do I achieve this? I have an application on AWS Amplify and it's working perfectly. However, I need to geo restrict access to the application!
@arximughal have you tried this: https://docs.aws.amazon.com/amplify/latest/userguide/redirects.html#region-based-redirects
Understanding the requirements better: The ask is to provide a way to restrict access to a certain geography.
Yeah. The problem I was facing was that I wanted to geo-restrict the access to the application deployed via Amplify. I still can't find an option inside AWS Amplify console where I can do just that!
I'm facing this problem too, I need to restrict access for users from some countries
I have this in my Rewrites and redirects rules:
[
{
"source": "<*>",
"target": "/access_denied.html",
"status": "200",
"condition": "<MA>"
},
{
"source": "<*>",
"target": "/access_denied.html",
"status": "200",
"condition": "<KE>"
},
{
"source": "<*>",
"target": "/access_denied.html",
"status": "200",
"condition": "<TN>"
},
{
"source": "<*>",
"target": "/access_denied.html",
"status": "200",
"condition": "<NG>"
},
{
"source": "</^[^.]+$|\\.(?!(css|gif|ico|jpg|js|png|txt|svg|woff|ttf|map|json)$)([^.]+$)/>",
"target": "/index.html",
"status": "200",
"condition": null
},
{
"source": "/<*>",
"target": "/index.html",
"status": "404",
"condition": null
}
]
But it doesn't seem to be working, It works for some countries, for example, if I put US or RU it works, but not fo Morocco for example
Any update on this? We're facing the same issue, we need to restrict certain countries from using the app.
This is a much needed feature - if Amplify allowed exposing most of the configs for the underlying CloudFront distro that would be perfect for a lot of these issues