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": [
{
@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.
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.