CmdID

CmdID / aws / aws imagebuilder

aws imagebuilder create-distribution-configuration

Creates a new distribution configuration. AWS CLI reference

1 example 6 options Its page in the AWS CLI reference

Opens CmdID with your command. It is read in your browser and sent nowhere.

Examples

from aws-cli, each command read by CmdID

To create a distribution configuration

The following create-distribution-configuration example creates a distribution configuration using a JSON file.

aws imagebuilder create-distribution-configuration --cli-input-json file://create-distribution-configuration.jsonIdentify

Contents of create-distribution-configuration.json:

{
    "name": "MyExampleDistribution",
    "description": "Copies AMI to eu-west-1",
    "distributions": [
        {
            "region": "us-west-2",
            "amiDistributionConfiguration": {
                "name": "Name {{imagebuilder:buildDate}}",
                "description": "An example image name with parameter references",
                "amiTags": {
                    "KeyName": "{{ssm:parameter_name}}"
                },
                "launchPermission": {
                    "userIds": [
                        "123456789012"
                    ]
                }
            }
        },
        {
            "region": "eu-west-1",
            "amiDistributionConfiguration": {
                "name": "My {{imagebuilder:buildVersion}} image {{imagebuilder:buildDate}}",
                "amiTags": {
                    "KeyName": "Value"
                },
                "launchPermission": {
                    "userIds": [
                        "123456789012"
                    ]
                }
            }
        }
    ]
}
Its output
{
    "requestId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",
    "clientToken": "a1b2c3d4-5678-90ab-cdef-EXAMPLE22222",
    "distributionConfigurationArn": "arn:aws:imagebuilder:us-west-2:123456789012:distribution-configuration/myexampledistribution"
}

For more information, see Manage custom image creation in Image Builder through a repeatable pipeline process in the EC2 Image Builder Users Guide.

Options

6 in the AWS CLI reference
--client-tokenA unique, case-sensitive identifier you provide to ensure that the operation runs no more than one time.
--descriptionThe description of the distribution configuration.
--distributionsThe distribution settings for the configuration.
--dry-runValidates the required permissions and request parameters without performing the operation.
--nameThe name of the distribution configuration.
--tagsThe tags of the distribution configuration.