CmdID

CmdID / aws / aws apprunner

aws apprunner associate-custom-domain

Associate your own domain name with the App Runner subdomain URL of your App Runner service. AWS CLI reference

1 example 3 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 associate a domain name and the www subdomain with a service

The following associate-custom-domain example associates a custom domain name that you control with an App Runner service. The domain name is the root domain example.com, including the special-case subdomain www.example.com.

aws apprunner associate-custom-domain --cli-input-json file://input.jsonIdentify

Contents of input.json:

{
    "ServiceArn": "arn:aws:apprunner:us-west-2:123456789012:service/python-app/8fe1e10304f84fd2b0df550fe98a71fa",
    "DomainName": "example.com",
    "EnableWWWSubdomain": true
}
Its output
{
    "CustomDomain": {
        "CertificateValidationRecords": [
            {
                "Name": "_70d3f50a94f7c72dc28784cf55db2f6b.example.com",
                "Status": "PENDING_VALIDATION",
                "Type": "CNAME",
                "Value": "_1270c137383c6307b6832db02504c4b0.bsgbmzkfwj.acm-validations.aws."
            },
            {
                "Name": "_287870d3f50a94f7c72dc4cf55db2f6b.www.example.com",
                "Status": "PENDING_VALIDATION",
                "Type": "CNAME",
                "Value": "_832db01270c137383c6307b62504c4b0.mzkbsgbfwj.acm-validations.aws."
            }
        ],
        "DomainName": "example.com",
        "EnableWWWSubdomain": true,
        "Status": "CREATING"
    },
    "DNSTarget": "psbqam834h.us-west-2.awsapprunner.com",
    "ServiceArn": "arn:aws:apprunner:us-west-2:123456789012:service/python-app/8fe1e10304f84fd2b0df550fe98a71fa"
}

For more information, see Managing custom domain names for an App Runner service in the AWS App Runner Developer Guide.

Options

3 in the AWS CLI reference
--domain-nameA custom domain endpoint to associate.
--enable-www-subdomainSet to true to associate the subdomain www.DomainName with the App Runner service in addition to the base domain.
--service-arnThe Amazon Resource Name (ARN) of the App Runner service that you want to associate a custom domain name with.