Amplify-console: AWS cli create domain association issue

Created on 15 Oct 2019  路  4Comments  路  Source: aws-amplify/amplify-console

Hi,
I am trying to run this command, but every time this command fails to create domain association with my new branch and my domain.

If i check my commands cli-skeleton, it returns :

{
"appId": "",
"domainName": "",
"enableAutoSubDomain": true,
"subDomainSettings": [
{
"prefix": "",
"branchName": ""
}
]
}

According to this my enableautosubdomain flag is true.

When i actual run this command:
It automatically becomes false.

{
"domainAssociation": {
"domainAssociationArn": "arn:aws:amplify/d2po5bkxstg6hw/domains/yyyyyyyy",
"domainName": "yyyyyyyyyy",
"enableAutoSubDomain": false,
"domainStatus": "AVAILABLE",
"certificateVerificationDNSRecord": "_f2377b9bdf6b5542726513f2d27ec699.yyyyyyyyyy. CNAME _e39f00fe985c8b167001afbc10ed31b1.olprtlswtu.acm-validations.aws.",
"subDomains": [
{

bug

Most helpful comment

aws amplify update-domain-association --app-id xxxxxxx --domain-name mydomain.com --sub-domain-settings "[{\"prefix\": \"test\",\"branchName\": \"test\"}, {\"prefix\": \"\",\"branchName\": \"master\"}]"

basically, each time you add a sub domain, you need to include every existing subdomains to the new request.

All 4 comments

@kontrol-debug the enableAutoSubDomain setting is not supported right now even though it is visible in the API docs. You cannot use this field at this moment.

Hi @swaminator,

Then what is the way out if i want to redirect a new branch url from test.yyyyy.amplifyapp.com to test.mydomain.com using aws command line.??

aws amplify update-domain-association --app-id xxxxxxx --domain-name mydomain.com --sub-domain-settings "[{\"prefix\": \"test\",\"branchName\": \"test\"}, {\"prefix\": \"\",\"branchName\": \"master\"}]"

basically, each time you add a sub domain, you need to include every existing subdomains to the new request.

@VividKnife ,

Thankyou for the help.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hassankhan picture hassankhan  路  4Comments

ayotise picture ayotise  路  4Comments

zackthoutt picture zackthoutt  路  3Comments

gherrera-gesintel picture gherrera-gesintel  路  4Comments

patleeman picture patleeman  路  5Comments