- Newest
- Most votes
- Most comments
Yes, you can use the AWS CLI to access the Amplify Hosting and Rewrite rules using the get-app CLI command. Please refer the below document for the same.
[+] https://awscli.amazonaws.com/v2/documentation/api/2.1.30/reference/amplify/get-app.html
In order to change or re-sequence your rules, you can re-sequence the rules directly in the Rewrites and redirects page in your Amplify App settings.
If you want to change or re-sequence the rules through AWS CLI you would need to write all the re-sequenced rules once again. You can refer the below document for updating the rewrites and redirects rules through the AWS CLI.
[+] https://awscli.amazonaws.com/v2/documentation/api/2.1.30/reference/amplify/update-app.html
Regarding the CloudFront rule, I believe that you are using a Next.js SSR app as the CloudFront rule is getting added at the top. So, the CloudFront rules which are created is an expected behaviour and this shouldn't affect the Next.js app. But, incase if you have any app related issue with this behaviour you can reach out to us.
Relevant content
- asked 2 years ago
- asked 2 years ago
- asked 2 years ago
- asked 3 years ago
- AWS OFFICIALUpdated 5 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated 2 years ago