awslabs / amplify-mobilehub-migrator

A plugin to migrate existing AWS Mobile Hub projects to be used with the Amplify CLI
https://amplify.aws
Apache License 2.0
13 stars 8 forks source link

Can't pull after migration #82

Closed Sam31000 closed 3 years ago

Sam31000 commented 3 years ago

Hi,

I'm trying to import all my mobliehub resources into my amplify project. I followed steps described on ampify-mobilehub-migrator and everything went well.

However I have an issue when i'm trying to amplify pull my project after the migration. Here are the steps :

But now I want to retrieve functions of my backend but when i'm doing "Amplify pull" I have the error below :

"Cannot destructure property 'provider' of 'serviceMetadata' as it is undefined."

image

After that I can't find the code of my lambda functions locally.

Configuration :

nimacks commented 3 years ago

@Sam31000, We have identified the root cause of this issue and will prioritize a fix imminently. I'll notify you when this is complete. The issue will be tracked in https://github.com/aws-amplify/amplify-cli/issues/7439

0xR commented 3 years ago

I did some debugging and the issue is that there is a typo in the amplify-meta.json.

      "service": "DynamoDb",

should be with different capitals:

      "service": "DynamoDB",

I fixed the typo in s3 and then amplify pull started working again.

The file was s3://amplify-myproject-dev-12345-deployment/amplify-meta.json

However, running amplify pull didn't fix much. I don't get my frontend in my amplify project, not any function.

What is this migrator supposed to do? I'm missing a lot of steps in the README after just running import.