amazon-web-services - 如何在 AWS CloudFormation 模板中的 Elastic Beanstalk 实例上设置运行状况检查 URL?

标签 amazon-web-services aws-cloudformation

我有一个启动 Elastic Beanstalk 服务的 CloudFormation 模板。我想在模板中将健康检查 URL 设置为 /health

JSON 中的约定是什么?

最佳答案

您需要设置 AWS::ElasticBeanstalk::EnvironmentOptionSettings 属性:

例如:

{
   "Type" : "AWS::ElasticBeanstalk::Environment",
   "Properties" : {
      "ApplicationName" : { "Ref" : "sampleApplication" },
      "Description" :  "AWS Elastic Beanstalk Environment running PHP Sample Application",
      "VersionLabel" : "Initial Version",
      "OptionSettings" : [ 
            {
               "Namespace" : "elasticbeanstalk:application",
               "OptionName" : "Application Healthcheck URL",
               "Value" : "/health"
            }         
      ],      
      "TemplateName" : "DefaultConfiguration",
   }
}    

在此示例中,选项应用程序运行状况检查 URL 设置为 /health

更多信息请参见:

  1. AWS::ElasticBeanstalk::Environment
  2. Configuration Options
  3. ConfigurationOptionSettings

关于amazon-web-services - 如何在 AWS CloudFormation 模板中的 Elastic Beanstalk 实例上设置运行状况检查 URL?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47753168/

相关文章:

node.js - 如何使用 AWS S3 签名 url 从 Postman 上传文件?

Python:如何从AWS S3读取和加载Excel文件?

aws-cloudformation - 使用带有自定义域的无服务器和无服务器域管理器时出现证书问题

amazon-web-services - 用于 S3 标准不经常访问文件的 AWS CLI 命令

linux - 如何访问 istio 创建的仪表板

amazon-web-services - 尝试使用 cloudformation 在 AWS greengrass 版本 2 中创建物联网组件时出错

windows - 更新 Cloudformation 上的 Bootstrap

amazon-web-services - 获取服务 : AmazonIdentityManagement; Status Code: 400; Error Code: MalformedPolicyDocument for while creating Cloudformation stack

amazon-web-services - Cloudformation 无法将输出参数与嵌套堆栈一起使用

amazon-web-services - CDK Codepipeline CloudFormationCreateUpdateStackAction 仅在使用嵌套堆栈时获取 "S3: Access Denied"