amplify-cli: Service: AWSCognitoIdentityProviderService - InvalidParameterException (7.3.3)

Before opening, please confirm:

  • I have installed the latest version of the Amplify CLI (see above), and confirmed that the issue still persists.
  • I have searched for duplicate or closed issues.
  • I have read the guide for submitting bug reports.
  • 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?

v12.16.1

Amplify CLI Version

7.3.3

What operating system are you using?

Ubuntu

Amplify Categories

auth, storage, function, api

Amplify Commands

push, update

Describe the bug

Hi folks,

We are having the issue in congito pool update while doing amplify push. Our dev group didn’t made any changes on backend. We’re having build settings with the latest version of amplify CLI. While doing backend deployment (amplify push), getting error.

Expected behavior

With the latest version of CLI (7.3.3) we have to deploy our existing stack without fail.

Reproduction steps

  1. Update CLI to 7.3.3
  2. auth with amplify application.
  3. Use amplify push

GraphQL schema(s)

# Put schemas below this line


Log output

Invalid AttributeDataType input, consider using the provided AttributeDataType enum. (Service: AWSCognitoIdentityProviderService; Status Code: 400; Error Code: InvalidParameterException


Additional information

Once we downgraded to version 7.3.2, its solved.

Note: error is occuring while moving to 7.3.3.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 24 (8 by maintainers)

Most upvoted comments

I’m having the same issue on v4.51.3, and I can’t update the CLI because I’m having other issues… so I’m stuck right now.

I’m wondering you could resolve this issue if you fix the amplify-codegen version to v2.26.15 or lower here. https://github.com/aws-amplify/amplify-cli/blob/2253364725bdfb336a524f1f341548a09aa3392c/packages/amplify-cli/package.json#L49

I can see an amplify-codegen peer dependency change happens on the patch release. https://github.com/aws-amplify/amplify-cli/blob/2253364725bdfb336a524f1f341548a09aa3392c/packages/amplify-cli/package.json#L49

The change probably breaks the older versions because the newer amplify-cli-core has the project but older versions don’t. https://github.com/aws-amplify/amplify-cli/blob/b3ca83b9bec986f0fd525d46738b277eb93e4384/packages/amplify-cli-core/src/feature-flags/featureFlags.ts#L743-L750

The new field is assigned into the existingProjectDefaults, and ajv on the CLI throws errors if it has additional fields. https://github.com/aws-amplify/amplify-cli/blob/2253364725bdfb336a524f1f341548a09aa3392c/packages/amplify-cli-core/src/feature-flags/featureFlags.ts#L262

I still don’t know why it is happening. Hopefully, this is helpful to debug the issue!

@sachscode Thank you for having a look at this!

The failing build happens in Amplify Console. The first failed build was initiated by git push to the repo. The changes where only in code of one of the lambda functions, no changes in Amplify resources.

Then I did several re-deploys of different commits in Amplify Console with different versions of the Amplify CLI - but again, the commits differed only in code of Lambdas, not in definitions of AWS resources.

I use only Amplify Console to modify the environment of the branch. I’ll try to configure amplify to target that environment and then run amplify status -v and I’ll let you know.