ALB rediretc to HTTPS.
Install Node.js and npm first!
npm i @cfn-modules/alb-redirect-to-https
---
AWSTemplateFormatVersion: '2010-09-09'
Description: 'cfn-modules example'
Resources:
Redirect:
Type: 'AWS::CloudFormation::Stack'
Properties:
Parameters:
AlbListenerModule: !GetAtt 'AlbListener.Outputs.StackName' # required
RedirectPort: '443' # optional
Priority: '1' # optional
HostPattern: '' # optional
PathPattern: '/*' # optional
TemplateURL: './node_modules/@cfn-modules/alb-redirect-to-https/module.yml'
none
Name | Description | Default | Required? | Allowed values |
---|---|---|---|---|
AlbListenerModule | Stack name of alb-listener module | yes | ||
RedirectPort | Port that is redirected to using the HTTPS protocol | 443 | ||
Priority | The priority for the rule. Elastic Load Balancing evaluates rules in priority order, from the lowest value to the highest value. If a request satisfies a rule, Elastic Load Balancing ignores all subsequent rules. A target group can have only one rule with a given priority. | 1 | no | 1-50000 |
HostPattern | Host pattern (you can specify HostPattern and/or PathPattern) | no | ||
PathPattern | Path pattern (you can specify HostPattern and/or PathPattern) | /* | no |