Closed rayshi67 closed 1 year ago
Amplify CLI might be right repo for this issue. Transferring this issue to Amplify CLI repo
Hey @ankpshah, thank you for reaching out. The issue appears to be similar to https://github.com/aws-amplify/amplify-cli/issues/13095 and https://github.com/aws-amplify/amplify-cli/issues/12827.
Was the Amplify CLI upgraded from version before 7.x? If yes, could you try adding the attributes using the override functionality by running amplify override auth
. similar to https://github.com/aws-amplify/amplify-cli/issues/13095 and https://github.com/aws-amplify/amplify-cli/issues/12827.
Do let us know if this does not mitigate the issue.
Hi @ykethan
Thank you for the prompt reply. I managed to get it working by following #12827. And the command 'amplify push' has now got through.
However when I tried to clone the existing environment, it gives the following error,
@rayshi67 could you check the environment stack in Cloudformation console for any error in the events?
Does this also occur when utilizing Amplify CLI, to add the env using amplify add env
and amplify push
?
I deleted a couple of old environments yesterday before doing a clone, and I can see all deletes are completed successfully on Cloudformation console. I cannot see any relevant error there.
There was no error occurred using 'amplify add env' and 'amplify push' earlier. But we need the clone to work otherwise we would have to write migration scripts now
I tried again to clone the existing env today, and got back the same error, 'Cloning env:test to env: tamdev in app:d24pb2d1td9ltj failed'
Hey @rayshi67, wanted to get some additional information in using the clone mechanism in the AWS console?
As using amplify add env
and amplify push
should create a new environment similar to your existing resources.
Additionally, could you also provide us additional information on the migration scripts and its usage?
So what is the root cause of the error when doing the clone in Amplify console?
Without using the clone in Amplify console, how could we back up the Amplify environment including its data?
And if we use ‘amplify env add’ to spin a new env, how would the data in cognito, dynamodb, and s3 etc in existing amplify env get populated into the newly created env? At the moment we haven’t got any mechanism in place for achieving that. So it would be great if you could point us to the right direction.
@rayshi67 thank you for the information. The clone functionality in the AWS Amplify console is similar to amplify add env
, it does not clone the data for the underlying resources being created. As you have pointed, we may have to utilize custom scripts or AWS services that may assist in cloning the data.
additionally, the clone error appears to be similar to https://github.com/aws-amplify/amplify-hosting/issues/3022. I have reached out to our folks in hosting team and will provide an update as soon as I receive any additional information.
wanted to provide an update on this issue, I was able to reproduce the issue by diving into the logs. The clone error was occurring due to resource overrides being present in the project. I have reached out to the appropriate Amplify team regarding this behaviour.
But we should be able to utilize amplify add env
to create a environment with similar resources as a workaround. Thank you for your patience.
Thank you for the update.
Closing the issue, please feel free in reaching out to us again.
Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.
Before opening, please confirm:
Language and Async Model
Java
Amplify Categories
Authentication
Gradle script dependencies
Environment information
Please include any relevant guides or documentation you're referencing
No response
Describe the bug
I couldn't push with AWS amplify as the Auth version was too old that needs to be updated. I did 'amplify update auth' and selected 'Apply default configuration without Social Provider (Federation)'.
However after i did 'amplify push' I got the following error:
Existing schema attributes cannot be modified or deleted. (Service: AWSCognitoIdentityProvider; Status Code: 400; Error Code: InvalidParameterException; Request ID: null; Proxy: null)
Reproduction steps (if applicable)
amplify update Auth amplify push
Code Snippet
Log output
amplifyconfiguration.json
No response
GraphQL Schema
Additional information and screenshots
amplify --version 12.3.0