Search code examples
amazon-web-servicesaws-amplify

amplify init fails on validation caused [$LATEST] inside 'stackName' value


I developing Vue project and have problem with amplify deployment console:

  1. I configured an Amplify project with Cognito Id Pools (Google).

  2. Added an environment 'dev' into the project located on the 'dev' git-branch. Successfully pushed to cloud.

  3. Then using Amplify console created Deployment project based on Github. Checked the environment and branch, and other settings properly. And tried to deploy project

  4. 'Provision' stage passed successfully

  5. 'Build' failed

After searching info about problem with no result I deleted Amplify from my project locally and on the cloud, using 'amplify delete'. Cleared my git-project from amplify's files and folder. Did all create actions again and got same error:

ValidationError: 1 validation error detected: Value '2019/08/17/[$LATEST]84c0b31765d7431faf5d8f4b51322d03' at 'stackName' failed to satisfy constraint: Member must satisfy regular expression pattern: [a-zA-Z][-a-zA-Z0-9]|arn:[-a-zA-Z0-9:/._+]

Value: '2019/08/17/[$LATEST]84c0b31765d7431faf5d8f4b51322d03' is abnormal. And [$LATEST] looks like variable name, that copied directly instead of being interpreted.

I don't know what to do. And what is the reason of problem.


Solution

  • The problem was on version of Amplify module on the cloud is lower than my local version

    My local amplify module version is 1.12.0.

    Cloud's amplify version is 1.7.2.

    After downgraded my local amplify version to 1.11.0 and recreated amplify project it works successfully.