4

I'm using the Elastic Beanstalk Command Line tool and the function eb config put config. According to the AWS Elastic Beanstalk documentation it is required that you name your file according to *.cfg.yml and place it inside the .elasticbeanstalk/saved_configs file (http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb3-config.html#eb3-configexample). I have done this, and it forces you to write Yaml. I don't know much about Yaml, but I have tried many different ways of writing my config file and I can't get EB to accept it. Below is basically what I think is the closest I've come (note actual names and url substituted below):

  aws:
    elasticbeanstalk:
      create-configuration-template:
        application_name: ProjectName
        template_name: TemplateName
        environment_id: EnvironmentName
        - option_settings:
          option_name: mongodb
          value: "mongoAddress.com"

The error message for the above is:

ERROR: Error parsing configuration file as yaml or json.  Yaml error: 'Invalid Yaml: while parsing a block mapping
 in "<reader>", line 4, column 5:
        application_name: ProjectName
        ^
expected <block end>, but found BlockEntry
 in "<reader>", line 7, column 5:
        - option_settings:
        ^
', Json error: 'Invalid JSON: Unexpected character (a) at position 0.'

and if I take away the "- " before option_settings then I get this error:

ERROR: Invalid Environment Configuration specification. Must specify configuration template version.

Any ideas? I've checked all over the internet and I can't find anything on this

EDIT: Here's some more on the template from the AWS docs: http://docs.aws.amazon.com/cli/latest/reference/elasticbeanstalk/create-configuration-template.html

1 Answer 1

4

Abhishek Singh from AWS got back to me on Twitter and shared this blog post from the AWS website.

https://blogs.aws.amazon.com/application-management/post/Tx1YHAJ5EELY54J/Using-the-Elastic-Beanstalk-EB-CLI-to-create-manage-and-share-environment-config

In summary, he recommends using "eb config save" then modifying the file so that you don't need to worry about format as much. The details of how to do this are in the post above.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.