Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Amplify Studio Deployment failed because your app backend contains function #1122

Closed
3 tasks done
pascalito007 opened this issue Oct 13, 2024 · 6 comments
Closed
3 tasks done
Labels
pending-triage An issue that is pending triage react native studio-backend An issue that needs to be tracked by Studio Backend team

Comments

@pascalito007
Copy link

pascalito007 commented Oct 13, 2024

Before opening, please confirm:

JavaScript Framework

React Native

Amplify APIs

GraphQL API

Amplify Version

v6

Amplify Categories

function

Backend

Amplify CLI

Environment information


  System:
    OS: macOS 15.0.1
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 201.20 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.11.1 - /usr/local/bin/node
    Yarn: 1.22.22 - ~/.yarn/bin/yarn
    npm: 10.2.4 - /usr/local/bin/npm
    bun: 1.1.30 - ~/.bun/bin/bun
    Watchman: 2024.09.30.00 - /usr/local/bin/watchman
  Browsers:
    Safari: 18.0.1
  npmPackages:
    @aws-amplify/react-native: ^1.1.6 => 1.1.6 
    @babel/core: ^7.20.0 => 7.25.7 
    @expo/vector-icons: ^14.0.2 => 14.0.4 
    @react-native-async-storage/async-storage: ^2.0.0 => 2.0.0 
    @react-native-community/netinfo: ^11.4.1 => 11.4.1 
    @react-navigation/material-top-tabs: ^6.6.14 => 6.6.14 
    @react-navigation/native: ^6.0.2 => 6.1.18 
    @types/jest: ^29.5.12 => 29.5.13 
    @types/react: ~18.2.45 => 18.2.79 
    @types/react-test-renderer: ^18.0.7 => 18.3.0 
    HelloWorld:  0.0.1 
    aws-amplify: ^6.6.4 => 6.6.4 
    aws-amplify/adapter-core:  undefined ()
    aws-amplify/analytics:  undefined ()
    aws-amplify/analytics/kinesis:  undefined ()
    aws-amplify/analytics/kinesis-firehose:  undefined ()
    aws-amplify/analytics/personalize:  undefined ()
    aws-amplify/analytics/pinpoint:  undefined ()
    aws-amplify/api:  undefined ()
    aws-amplify/api/server:  undefined ()
    aws-amplify/auth:  undefined ()
    aws-amplify/auth/cognito:  undefined ()
    aws-amplify/auth/cognito/server:  undefined ()
    aws-amplify/auth/enable-oauth-listener:  undefined ()
    aws-amplify/auth/server:  undefined ()
    aws-amplify/data:  undefined ()
    aws-amplify/data/server:  undefined ()
    aws-amplify/datastore:  undefined ()
    aws-amplify/in-app-messaging:  undefined ()
    aws-amplify/in-app-messaging/pinpoint:  undefined ()
    aws-amplify/push-notifications:  undefined ()
    aws-amplify/push-notifications/pinpoint:  undefined ()
    aws-amplify/storage:  undefined ()
    aws-amplify/storage/s3:  undefined ()
    aws-amplify/storage/s3/server:  undefined ()
    aws-amplify/storage/server:  undefined ()
    aws-amplify/utils:  undefined ()
    expo: ~51.0.28 => 51.0.37 
    expo-constants: ~16.0.2 => 16.0.2 
    expo-font: ~12.0.9 => 12.0.10 
    expo-linking: ~6.3.1 => 6.3.1 
    expo-router: ~3.5.23 => 3.5.23 
    expo-secure-store: ~13.0.2 => 13.0.2 
    expo-splash-screen: ~0.27.5 => 0.27.6 (0.27.5)
    expo-status-bar: ~1.12.1 => 1.12.1 
    expo-system-ui: ~3.0.7 => 3.0.7 
    expo-web-browser: ~13.0.3 => 13.0.3 
    jest: ^29.2.1 => 29.7.0 
    jest-expo: ~51.0.3 => 51.0.4 
    nativewind: ^2.0.11 => 2.0.11 
    react: 18.2.0 => 18.2.0 
    react-dom: 18.2.0 => 18.2.0 
    react-native: 0.74.5 => 0.74.5 
    react-native-gesture-handler: ~2.16.1 => 2.16.2 
    react-native-get-random-values: ^1.11.0 => 1.11.0 
    react-native-pager-view: 6.3.0 => 6.3.0 
    react-native-reanimated: ~3.10.1 => 3.10.1 
    react-native-safe-area-context: 4.10.5 => 4.10.5 
    react-native-screens: 3.31.1 => 3.31.1 
    react-native-svg: ^15.7.1 => 15.7.1 
    react-native-web: ~0.19.10 => 0.19.12 
    react-test-renderer: 18.2.0 => 18.2.0 
    tailwindcss: 3.3.2 => 3.3.2 
    typescript: ~5.3.3 => 5.3.3 
    zustand: ^5.0.0-rc.2 => 5.0.0-rc.2 
  npmGlobalPackages:
    @angular/cli: 14.2.9
    @aws-amplify/cli: 12.3.0
    @ionic/cli: 6.20.1
    corepack: 0.23.0
    create-expo-app: 3.0.0
    create-react-app: 3.4.1
    csv-to-firestore: 1.0.0
    csvtojson: 2.0.10
    eas-cli: 10.0.0
    firebase-import: 2.2.0
    firebase-tools: 8.12.1
    ionic: 5.4.16
    n: 7.1.0
    netlify-cli: 10.7.1
    npm-check-updates: 16.14.20
    npm: 10.2.4
    react-native-cli: 2.0.1
    react-native: 0.71.8
    serve: 11.3.2
    serverless: 3.22.0
    ts-node: 10.9.1
    yarn: 1.22.19


Describe the bug

After adding a function using CLI and successfully push with amplify push, I cannot update my data models from amplify studio. I got below message

An error occurred while processing your request: Deployment failed because your app backend contains function. Amplify Studio only supports API, Auth, and Storage deployments. Please use the Amplify CLI to deploy updates.

Capture d’écran 2024-10-13 à 12 25 30

Expected behavior

I should be able to create and update Data Model from amplify studio even if function exists.

Reproduction steps

  1. Add function using amplify add function
  2. Push the changes
  3. Go to Data menu of amplify studio and add or update a Data Model
  4. You should get the message I am getting

Code Snippet

// Put your code below this line.

Log output

// Put your logs below this line


aws-exports.js

No response

Manual configuration

No response

Additional configuration

No response

Mobile Device

No response

Mobile Operating System

No response

Mobile Browser

No response

Mobile Browser Version

No response

Additional information and screenshots

No response

@github-actions github-actions bot added the pending-triage An issue that is pending triage label Oct 13, 2024
@k1r4n333
Copy link

I am facing this exact same issue. I thought it was because I added field "subscriptionsInheritPrimaryAuth" to the amplify/backend/cli.json , however upon removing it I am still faced with the same error as in this post.

@ashika112 ashika112 added graphql Graphql/AppSync API react native labels Oct 14, 2024
@arundna arundna transferred this issue from aws-amplify/amplify-js Oct 14, 2024
@arundna arundna added studio-backend An issue that needs to be tracked by Studio Backend team and removed graphql Graphql/AppSync API labels Oct 14, 2024
@RitvarsFr
Copy link

is there a way to add those Data models through CLI and will that work?

@RitvarsFr
Copy link

I got this:

An error occurred while processing your request: Deployment failed because your app backend contains analytics, function, geo, notifications. Amplify Studio only supports API, Auth, and Storage deployments. Please use the Amplify CLI to deploy updates.

@RitvarsFr
Copy link

My workaround this was:
create DataModels in Visual Editor -> Click on GraphQL Schema ->Copy Schema -> paste into amplify/backend/api//schema.graphql -> save the schema.graphql file and -> amplify push

@cwoolum
Copy link
Contributor

cwoolum commented Oct 16, 2024

Hey folks, thank you for reaching out. The message observed is the expected behavior as Amplify Studio does not support deploying resources such as functions, project with overrides, and custom resources enabled, etc. To continue deploying your resources, you need to utilize Amplify CLI to pull the project locally. Please refer to the documentation providing information on pulling the project locally.

https://docs.amplify.aws/gen1/react/tools/console/adminui/extend-cli/

@cwoolum cwoolum closed this as completed Oct 16, 2024
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending-triage An issue that is pending triage react native studio-backend An issue that needs to be tracked by Studio Backend team
Projects
None yet
Development

No branches or pull requests

6 participants