amplify-cli icon indicating copy to clipboard operation
amplify-cli copied to clipboard

Auto-generated domain label is too long

Open mmcpherson-waymark opened this issue 3 years ago • 2 comments

Before opening, please confirm:

  • [X] I have installed the latest version of the Amplify CLI (see above), and confirmed that the issue still persists.
  • [X] I have searched for duplicate or closed issues.
  • [X] I have read the guide for submitting bug reports.
  • [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.

How did you install the Amplify CLI?

npm

If applicable, what version of Node.js are you using?

16.4.0

Amplify CLI Version

7.6.12

What operating system are you using?

Arch

Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.

No manual changes

Amplify Categories

api

Amplify Commands

push

Describe the bug

I am attempting to add a containerized API to an existing project, following this blog post. At the point where I do my first push, the auto-generated domain label is over the accepted Route53 limit of 63 characters and the push fails:

FATAL problem: DomainLabelTooLong (Domain label is too long) encountered with 'amplify-amplify655641f4e14f4-staging-213820-vpc-0ba53bc887a43c94'

Expected behavior

Amplify should not generate domain labels that are outside of the restrictions imposed by Route53.

Reproduction steps

  1. init a new project named mylongnamedamplifyte
  2. use an environment named stagingaaa
  3. enable containerized deployments via amplify configure project
  4. add a containerized api
  5. amplify push
Following resources failed

Resource Name: ns-kk6i2x47cgl4izvx (AWS::ServiceDiscovery::PrivateDnsNamespace)
Event Type: create
Reason: FATAL problem: DomainLabelTooLong (Domain label is too long) encountered with 'amplify-mylongnamedamplifyte-stagingaaa-92442-vpc-0ba53bc887a43c' (Service: AmazonRoute53; Status Code: 400; Error Code: InvalidDomainName; Request ID: 75e942ac-cc51-480c-a68b-acb5df3f9ac7; Proxy: null)

GraphQL schema(s)

# Put schemas below this line


Log output

# Put your logs below this line


Additional information

No response

mmcpherson-waymark avatar Jan 25 '22 17:01 mmcpherson-waymark

Hey @mmcpherson-waymark :wave: thanks for raising this! I was able to successfully recreate this error using the provided steps. Marking as a bug 🙂

DomainLabelTooLong (Domain label is too long) encountered with 'amplify-mylongnamedamplifyte-stagingaaa-85340-vpc-06bccfa25ad401'

josefaidt avatar Feb 01 '22 15:02 josefaidt

Still happening to this day.

FATAL problem: DomainLabelTooLong (Domain label is too long) encountered with 'amplify-amplify2d84695331474-staging-25456-vpc-04494f818edb766bd'

jseun avatar Aug 30 '24 11:08 jseun