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
173 stars 60 forks source link

Can't change framework in gen 2 app from the UI #2128

Open robert-j-webb opened 3 days ago

robert-j-webb commented 3 days ago

Environment information

System:
  OS: macOS 14.6.1
  CPU: (12) arm64 Apple M2 Max
  Memory: 184.50 MB / 32.00 GB
  Shell: /opt/homebrew/bin/fish
Binaries:
  Node: 20.16.0 - ~/.nvm/versions/node/v20.16.0/bin/node
  Yarn: 1.22.19 - /opt/homebrew/bin/yarn
  npm: 10.8.1 - ~/.nvm/versions/node/v20.16.0/bin/npm
  pnpm: 8.10.5 - ~/.nvm/versions/node/v18.15.0/bin/pnpm
NPM Packages:
  @aws-amplify/auth-construct: Not Found
  @aws-amplify/backend: Not Found
  @aws-amplify/backend-auth: Not Found
  @aws-amplify/backend-cli: 1.2.9
  @aws-amplify/backend-data: Not Found
  @aws-amplify/backend-deployer: 1.1.5
  @aws-amplify/backend-function: Not Found
  @aws-amplify/backend-output-schemas: 1.3.0
  @aws-amplify/backend-output-storage: Not Found
  @aws-amplify/backend-secret: 1.1.4
  @aws-amplify/backend-storage: Not Found
  @aws-amplify/cli-core: 1.1.3
  @aws-amplify/client-config: 1.4.0
  @aws-amplify/deployed-backend-client: 1.4.2
  @aws-amplify/form-generator: 1.0.3
  @aws-amplify/model-generator: 1.0.8
  @aws-amplify/platform-core: 1.1.0
  @aws-amplify/plugin-types: 1.3.0
  @aws-amplify/sandbox: 1.2.3
  @aws-amplify/schema-generator: 1.2.4
  aws-amplify: Not Found
  aws-cdk: 2.162.1
  aws-cdk-lib: 2.162.1
  typescript: 5.5.3
AWS environment variables:
  AWS_STS_REGIONAL_ENDPOINTS = regional
  AWS_NODEJS_CONNECTION_REUSE_ENABLED = 1
  AWS_SDK_LOAD_CONFIG = 1
No CDK environment variables

Describe the bug

I see Next.JS -SSR as the framework:

image

I don't know how to change this. I have a docusaurus site, which is a static site. Whenever I try to deploy, it tries to find next files to run.

I know I can change the platform with

 aws amplify update-app --app-id d28gd4ifb9c9ul --platform WEB

But framework isn't listed in this. Additionally, I have a gen 2 app and that's a gen 1 cli command.

Reproduction steps

I believe the issue is if you have 2 websites in the same folder, but it's not a mono repo, like so

/docusaurus
/nextjs-starter
package.json

But I would have to test that

Jay2113 commented 5 hours ago

Hi @robert-j-webb 👋 , thanks for reaching out. We currently do not support switching an app's framework or platform from the Amplify console. You can update the platform and framework field via these commands:

aws amplify update-app --app-id <APP_ID> --platform WEB --region <REGION>
aws amplify update-branch --app-id <APP_ID> --branch-name <BRANCH_NAME> --framework <FRAMEWORK> --region <REGION>

Additionally, the update-app and update-branch APIs are related to Amplify Hosting and are identical across both Gen 1 and Gen 2 apps.

I am going to mark this as a feature request.