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

Environment name with alphanumerics and numbers

Open cptflammin opened this issue 6 years ago • 14 comments
trafficstars

Currently only supported lower case letters. As we may have by example different use case environments (dev, alpha, beta, test (qualification), prod, demo1, demo2...) and regions (us-west1, eu-central-1...), it would be better being able to name them

eu-central-1_dev us-west-2_demo1 etc...

cptflammin avatar Mar 05 '19 12:03 cptflammin

While we're doing this, can we make environment names longer please? 10 chars is pretty limiting!

biddster avatar Mar 21 '19 14:03 biddster

I too would like this feature. We use amplify and we like to match our git branch name with the environment name. Cloudformation can handle numbers, letters and dashes so i don't see why amplify can't as well.

AustinDeric avatar Aug 09 '19 19:08 AustinDeric

We need this too, we use git-flow in our development process and as @AustinDeric we need to match the branch name with the environment, currently, we have to perform some transformations on our CI process to address this limitation.

👍

jcvalerio avatar Aug 29 '19 15:08 jcvalerio

Is there any movement on this? The limitation is a real bummer.

melodymorgan avatar Dec 17 '19 02:12 melodymorgan

Any updates here? Seems like something that should be supported...

alexkates avatar Feb 14 '20 18:02 alexkates

Hi guys,

This is really needed. It is nice to use the full CI/CD pipeline but as others have mentioned, when using the feature branching model from gitflow with feature names based on Jira issues it is very limiting accepting only alphas in the naming and only supporting 10 chars. Why is there a feature and release branch auto-detection option for in the Amplify Console? It totally defeats the purpose.

All my feature branches are failing at the Build stage with error: Environment name should be between 2 and 10 characters (only lowercase alphabets).

Please help us with this! @undefobj Thanks!

cnegrisanu avatar Apr 20 '20 21:04 cnegrisanu

Another vote to have this addressed, the usefulness of automatic builds for feature branches is greatly diminished with such severe limitations on the branch names

fsjodininfrapros avatar May 25 '20 18:05 fsjodininfrapros

Another related use-case for you.

At the moment it's not possible to use the AppSync @function directive with a lambda function that has an underscore in the name.

Template format error: Resource name ScopingAPIDevRun_embedding_suggestionsLambdaDataSourceRole is non alphanumeric.

This issue also looks to be related https://github.com/aws-amplify/amplify-cli/issues/2526

I can make this a separate issue if you'd prefer

PTaylour avatar Jul 14 '20 15:07 PTaylour

Hey, same issue for us. We use jira which has tickets ids like "PROJECT-123". We'd love to be able to create environments for these tickets, named like project123.

maximelebastard avatar Jul 30 '20 21:07 maximelebastard

Ridiculous error. It renders the feature branch feature almost useless. These don't work:

  • e2e
  • foo-bar

adi-works avatar Jul 27 '21 10:07 adi-works

would love to see an update on this

rush86999 avatar Dec 18 '21 14:12 rush86999

Any updates on this?

nwmahoney avatar Jul 26 '22 17:07 nwmahoney

I'm strongly assume that this issue appears just on remote CI/CD, and the reason is that you use the amplifyPush script: https://github.com/aws-amplify/amplify-hosting/blob/main/scripts/amplifyPush.sh

The workaround: use amplifyPush --simple flag

For the Amplify Team: I think the solution is lowercase and exclude all the special characters from that ${ENV} variable in the script.

hackmajoris avatar Sep 17 '22 18:09 hackmajoris