Search code examples
amazon-web-servicesaws-sdkaws-amplify

How can I programmatically create a redirect rule for an Amplify app?


Does AWS provide a mechanism to progammatically update the redirect property of an Amplify app, equivalent to what you can do from the Amplify management console, as shown below?

I'm aware of the UpdateAppCommand from @aws-sdk/client-amplify, but it doesn't seem to let you update the rewrite rule.

enter image description here


Solution

  • UpdateAppCommand from @aws-sdk/client-amplify allows you to specify the customRules property, which does what you are looking for.