Skip to content

OpenSearch Application Name Inconsistency

0

The docs specify opensearch application name should be 3-40 chars and allows hyphens https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opensearchservice-application.html#cfn-opensearchservice-application-name

In console when trying to create an opensearch application, the name requirements are 3-30 chars and allows hyphens https://eu-west-1.console.aws.amazon.com/aos/home?region=eu-west-1#opensearch/applications/create-application

Through cloudformation api, it appears name requirements are 3-30 chars and do not allow hyphens, which is quite limiting. E.g. error message: Resource handler returned message: "Invalid request provided: 1 validation error detected: Value 'example-app-name' at 'id' failed to satisfy constraint: Member must satisfy regular expression pattern: [a-z0-9]{3,30} (Service: OpenSearch, Status Code: 400...

Would it be possible to make these consistent across different services and allow hyphens through cloudformation?

asked 2 years ago238 views

1 Answer
0

Thank you for bringing this inconsistency to our attention. You're correct that there appears to be a discrepancy in the naming requirements for OpenSearch applications across different AWS interfaces and documentation.

Based on the most current and authoritative information from the Amazon OpenSearch Service API documentation, the correct naming requirements for an OpenSearch application are as follows:

  1. The name should have a minimum length of 3 characters and a maximum length of 30 characters.
  2. The name should follow the pattern [a-z][a-z0-9-]+, which means it must start with a lowercase letter and can contain lowercase letters, numbers, and hyphens.

This is consistent with what you've observed in the AWS Console. However, it appears that the CloudFormation documentation and the actual API implementation may not be fully aligned with these requirements.

Regarding your specific concerns:

  1. The CloudFormation documentation suggesting a maximum length of 40 characters appears to be incorrect and should be updated to reflect the 30-character limit.

  2. The CloudFormation API not allowing hyphens is indeed inconsistent with the official API specifications and the console behavior. This seems to be an implementation issue that should be addressed.

  3. The error message you received through the CloudFormation API suggests a more restrictive pattern ([a-z0-9]{3,30}) than what is officially documented, which is another inconsistency that needs to be resolved.

These inconsistencies can certainly cause confusion and difficulties for users trying to create OpenSearch applications. It would be beneficial to have these requirements standardized across all interfaces and documentation.

As an AWS user, you can report this inconsistency to AWS support or through the AWS forums to bring it to the attention of the relevant teams. They should work on aligning the CloudFormation implementation with the official API specifications, updating any incorrect documentation, and ensuring consistency across all interfaces.

In the meantime, for the most reliable results, it's advisable to follow the naming convention of 3-30 characters, starting with a lowercase letter, and using only lowercase letters, numbers, and hyphens, as this seems to be the common denominator that works across different interfaces.
Sources
ApplicationSummary - Amazon OpenSearch Service
CreateApplication - Amazon OpenSearch Service

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.