This is the new Amazon CloudFormation Template Reference Guide. Please update your bookmarks and links. For help getting started with CloudFormation, see the Amazon CloudFormation User Guide.
AWS::Amplify::App CustomRule
The CustomRule property type allows you to specify redirects, rewrites, and reverse proxies. Redirects enable a web app to reroute navigation from one URL to another.
Syntax
To declare this entity in your Amazon CloudFormation template, use the following syntax:
Properties
- Condition
- 
                    The condition for a URL rewrite or redirect rule, such as a country code. Required: No Type: String Pattern: (?s).*Minimum: 0Maximum: 2048Update requires: No interruption 
- Source
- 
                    The source pattern for a URL rewrite or redirect rule. Required: Yes Type: String Pattern: (?s).+Minimum: 1Maximum: 2048Update requires: No interruption 
- Status
- 
                    The status code for a URL rewrite or redirect rule. - 200
- 
                                Represents a 200 rewrite rule. 
- 301
- 
                                Represents a 301 (moved pemanently) redirect rule. This and all future requests should be directed to the target URL. 
- 302
- 
                                Represents a 302 temporary redirect rule. 
- 404
- 
                                Represents a 404 redirect rule. 
- 404-200
- 
                                Represents a 404 rewrite rule. 
 Required: No Type: String Pattern: .{3,7}Minimum: 3Maximum: 7Update requires: No interruption 
- Target
- 
                    The target pattern for a URL rewrite or redirect rule. Required: Yes Type: String Pattern: (?s).+Minimum: 1Maximum: 2048Update requires: No interruption