Getting 403 ACCESS DENIED error when deploying React Web app on AWS Amplify Getting 403 ACCESS DENIED error when deploying React Web app on AWS Amplify reactjs reactjs

Getting 403 ACCESS DENIED error when deploying React Web app on AWS Amplify


Use this rule on amplify console.[    {        "source": "</^[^.]+$|\\.(?!(css|gif|ico|jpg|js|png|txt|svg|woff|ttf|map|json)$)([^.]+$)/>",        "target": "/index.html",        "status": "200",        "condition": null    }]


When you create the zip folder, make sure you zip the contents of your build output and not the top level folder. For example, if your build output generates a folder named “build” or “public”, first navigate into that folder, select all of the contents, and zip it from there. If you do not do this, you will see an “Access Denied” error because the site's root directory will not be initialized properly.

  <Error>      <Code>AccessDenied</Code>      <Message>Access Denied</Message>      <RequestId>4442587FB7D0A2F9</RequestId>      <HostId>...</HostId> </Error>