相关疑难解决方法(0)

AWS EB:未解决的资源依赖性

感谢这篇精彩的文章,我的 Django 应用程序已部署并正常工作:https://medium.com/@justaboutcloud/how-to-deploy-a-django3-application-on-elastic-beanstalk-python3-7-and-amazon- linux-2-bd9b8447b55

我已完成该项目并正在设置 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
Run Code Online (Sandbox Code Playgroud)

当我部署应用程序时,我收到以下错误消息:

Service:AmazonCloudFormation, Message:Template format error: Unresolved resource dependencies [AWSEBV2LoadBalancer] in the Resources block of the template
Run Code Online (Sandbox Code Playgroud)

我有两个理论:

  1. 我没有以正确的格式粘贴 ARN 证书,这导致我的 YAML 格式不正确

  2. 这段代码的格式有问题。

有人可以提供一些意见吗?

django yaml amazon-elastic-beanstalk

1
推荐指数
1
解决办法
2283
查看次数

标签 统计

amazon-elastic-beanstalk ×1

django ×1

yaml ×1