aws-amplify / amplify-backend

Home to all tools related to Amplify's code-first DX (Gen 2) for building fullstack apps on AWS
Apache License 2.0
185 stars 62 forks source link

Using API resources from a Gen 1 Project to a newly created Gen 2 #1843

Closed bebopinbebop closed 2 months ago

bebopinbebop commented 3 months ago

Environment information

System:
  OS: macOS 14.6.1
  CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
  Memory: 1.91 GB / 64.00 GB
  Shell: /bin/zsh
Binaries:
  Node: 20.11.1 - ~/.nvm/versions/node/v20.11.1/bin/node
  Yarn: undefined - undefined
  npm: 10.2.4 - ~/.nvm/versions/node/v20.11.1/bin/npm
  pnpm: undefined - undefined
NPM Packages:
  @aws-amplify/auth-construct: 1.2.0
  @aws-amplify/backend: 1.0.4
  @aws-amplify/backend-auth: 1.1.0
  @aws-amplify/backend-cli: 1.2.1
  @aws-amplify/backend-data: 1.1.0
  @aws-amplify/backend-deployer: 1.0.2
  @aws-amplify/backend-function: 1.3.0
  @aws-amplify/backend-output-schemas: 1.1.0
  @aws-amplify/backend-output-storage: 1.0.2
  @aws-amplify/backend-secret: 1.0.0
  @aws-amplify/backend-storage: 1.0.4
  @aws-amplify/cli-core: 1.1.1
  @aws-amplify/client-config: 1.1.1
  @aws-amplify/deployed-backend-client: 1.1.0
  @aws-amplify/form-generator: 1.0.0
  @aws-amplify/model-generator: 1.0.2
  @aws-amplify/platform-core: 1.0.3
  @aws-amplify/plugin-types: 1.1.0
  @aws-amplify/sandbox: 1.1.1
  @aws-amplify/schema-generator: 1.2.0
  aws-amplify: 6.4.3
  aws-cdk: 2.150.0
  aws-cdk-lib: 2.150.0
  typescript: 5.5.4
AWS environment variables:
  AWS_STS_REGIONAL_ENDPOINTS = regional
  AWS_NODEJS_CONNECTION_REUSE_ENABLED = 1
  AWS_SDK_LOAD_CONFIG = 1
No CDK environment variables

Description

I have this project where I am reconstructing this React app into a Flutter one for hardware performance: https://aws.amazon.com/blogs/apn/how-to-build-a-fintech-app-on-aws-using-the-plaid-api/

which was made in 2022 that uses Gen1 stuff.

I need help taking the API and Lambda functions made by that project and adept them to my Flutter code, so I basically copied the same backend files into my amplify folder and then pushed it to amplify on the CLI.

Thing is, I started building my project following the Gen2 instructions for Typescript backend manipulation, but when trying to merge the tutorial's backend into my project, it started using Gen1 standards.

so now I have an

amplify_outputs.dart

and

amplifyconfigurations.dart

In my amplifyconfigurations.dart file, I tried adding an api section and filling in the blanks with info from the already made resource I have.

Can someone please guide me on how to merge these resources or how to properly build it again for my code to call?

ykethan commented 3 months ago

Hey @bebopinbebop, thank you for reaching out. Amplify Gen 1 and Gen 2 follow different architectural and tooling paradigms. I would not suggest moving your Amplify Gen 1 files into a Gen 2 application or vice versa. refer to this document providing this information: https://docs.amplify.aws/react/how-amplify-works/faq/

ykethan commented 2 months ago

Closing the issue due to inactivity. Do reach out to us if you are still experiencing this issue