【发布时间】:2020-09-15 09:31:08
【问题描述】:
我即将结束项目并正在设置 HTTPS。为此,我在 .ebextensions 文件夹中创建了一个名为 02_https.config 的配置文件
在这个文件中,我复制并粘贴了文章中的代码:
option_settings:
aws:elbv2:listener:443:
SSLCertificateArns: <YourACMCertificateARN>
Protocol: HTTPS
Resources:
AWSEBV2LoadBalancerListener:
Type: 'AWS::ElasticLoadBalancingV2::Listener'
Properties:
LoadBalancerArn: { "Ref" : "AWSEBV2LoadBalancer" }
DefaultActions:
- RedirectConfig:
Port: 443
Protocol: HTTPS
StatusCode: HTTP_301
Type: redirect
Port: 80
Protocol: HTTP
当我部署应用程序时,我收到以下错误消息:
Service:AmazonCloudFormation, Message:Template format error: Unresolved resource dependencies [AWSEBV2LoadBalancer] in the Resources block of the template
我有两个理论:
我没有以正确的格式粘贴 ARN 证书,这导致我的 YAML 格式失效
这段代码的格式有问题。
有人可以提供一些意见吗?
【问题讨论】:
-
您正在使用旧的经典负载均衡器
elb而不是新的应用程序elbv2
标签: django yaml amazon-elastic-beanstalk