Search code examples
amazon-web-servicesamazon-elastic-beanstalkaws-cloudformationebextensions

Creating WaitConditionHandle using .ebextensions


I'm trying to create a WaitConditionHandle during the ElasticBeanstalk application deployment using AWS Elastic Beanstalk configuration files (.ebextensions).

The configuration file is in yaml and below is the content, created following CloudFormation docs:

Resources:
  ELBWaitConditionHandle:
   Type: AWS::CloudFormation::WaitConditionHandle
   Properties: 

While deploying the application, the ElasticBeanstalk is showing below error in events log:

ERROR Service:AmazonCloudFormation, Message:[/Resources/ELBWaitConditionHandle/Properties] 'null' values are not allowed in templates

ElasticBeanstalk's CloudFormation stack is not updated, So it's failing the validation even before running stack update.


Solution

  • Converting the configuration from YAML to JSON resulted in below and explains the error I got:

    {
      "Type": "AWS::CloudFormation::WaitConditionHandle",
      "Properties": null
    }

    So, I converted the JSON syntax given in AWS docs to YAML, which resulted in below:

    Type: AWS::CloudFormation::WaitConditionHandle
    Properties: {}

    With above, ElasticBeanstalk is creating WaitConditionHandle.