AWS Amplify Domain Management

90 Views Asked by At

I initially added a domain in AWS Amplify, but after a few hours, I decided to remove it from the AWS Amplify domain management. I also deleted the corresponding Route 53 records. Now, I want to add the same domain again. However, when I click 'Add Domain' on the AWS Amplify page, I encounter a warning stating, 'You are about to add a multi-level subdomain'.

I attempted to delete the AWS Amplify app, but it was unsuccessful.

1

There are 1 best solutions below

1
Gabriel Flores On

How I Resolved the Issue

To overcome the challenge, I took an alternative approach by adding the custom domain using the AWS CLI. I executed the following command in the AWS CloudShell:

aws amplify create-domain-association --app-id d3fnoutyjituya --domain-name mydomain.com --sub-domain-settings '[{"prefix": "www", "branchName": "main"}]'    

By using this command, I successfully associated the custom domain "mydomain.com" with my Amplify app, specifying the subdomain prefix "www" linked to the "main" branch. Remember to replace the values in the command with your actual App ID, custom domain name, and desired sub-domain settings.