2

This has been driving me nuts. Can anyone point me to the docs section that has this information?

The cli-input json to aws elasticbeanstalk create-environment command

{
    "ApplicationName": "MyApp",
    "EnvironmentName": "MyAppEnv01",
    "GroupName": "",
    "Description": "",
    "CNAMEPrefix": "my-app-env-01",
    "Tier": { // What are the all the allowed options here????
        "Name": "WebServer",
        "Type": "Standard",
        "Version": "1.0"
    },
    "SolutionStackName": "64bit Amazon Linux 2017.09 v2.8.4 running Docker 17.09.1-ce"
}

EDIT 1

I was able to get the values for my specific use case by using the deprecated (?) eb-cli to init, create and then look at the resulting stdout (see code box above). This is obviously a dirty hack and I will post what I find; but if anyone has a link to the official aws docs page, please do share.

EDIT 2

Another way to reverse engineer the environment parameters is to create an environment manually on the AWS console and fetch its description via aws cli:

$ aws elasticbeanstalk describe-environments --environment-name my-env
AlexanderF
  • 211
  • 1
  • 9

1 Answers1

0

You can use the --generate-cli-skeleton command. As mentioned in the documentation for create-application subcommand:

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.

emphasis mine

which generates:

└──$ aws elasticbeanstalk create-environment --generate-cli-skeleton
{
    "ApplicationName": "",
    "EnvironmentName": "",
    "GroupName": "",
    "Description": "",
    "CNAMEPrefix": "",
    "Tier": {
        "Name": "",
        "Type": "",
        "Version": ""
    },
    "Tags": [
        {
            "Key": "",
            "Value": ""
        }
    ],
    "VersionLabel": "",
    "TemplateName": "",
    "SolutionStackName": "",
    "PlatformArn": "",
    "OptionSettings": [
        {
            "ResourceName": "",
            "Namespace": "",
            "OptionName": "",
            "Value": ""
        }
    ],
    "OptionsToRemove": [
        {
            "ResourceName": "",
            "Namespace": "",
            "OptionName": ""
        }
    ]
}

For possible values and types, I generally refer to the boto3 client's request docs. They generally describe individual elements in detail.

https://boto3.readthedocs.io/en/latest/reference/services/elasticbeanstalk.html#ElasticBeanstalk.Client.create_environment

hjpotter92
  • 670
  • 1
  • 10
  • 20
  • This exactly the problem I'm describing :) The fact that some parameter should be a "string" doesn't say anything regarding the actual values that AWS expects. – AlexanderF Mar 06 '18 at 23:22
  • @AlexanderF. You want something like boto3 provides? https://boto3.readthedocs.io/en/latest/reference/services/elasticbeanstalk.html#ElasticBeanstalk.Client.create_environment – hjpotter92 Mar 06 '18 at 23:39
  • 1
    That page seems to have the same deficiencies as the official docs. I'm looking for something like what aws already has in elasticbeanstalk [general options documentation](https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-options-general.html#command-options-general-autoscalinglaunchconfiguration) but for the rest of the parameters. – AlexanderF Mar 07 '18 at 01:38