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

No export named apiXXXXXXXiGraphQLAPIIdOutput:GetAtt:TodoTable:StreamArn found #13740

Open
2 tasks done
subhayum-amplify opened this issue Apr 26, 2024 · 1 comment
Open
2 tasks done
Labels
bug Something isn't working functions Issues tied to the functions category p2

Comments

@subhayum-amplify
Copy link

subhayum-amplify commented Apr 26, 2024

How did you install the Amplify CLI?

NPM

If applicable, what version of Node.js are you using?

v20.11.0

Amplify CLI Version

12.10.1 , 12.10.3, 12.11.1

What operating system are you using?

Mac

Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.

No

Describe the bug

I have an existing function which is created amplify add function as DynamoDB Stream trigger.
After the I added a permission for reading auth category using amplify update function, amplify push fails with error :

No export named apiXXXXGraphQLAPIIdOutput:GetAtt:TodoTable:StreamArn found, IsCustomResource: false

However if directly running amplify add function and then adding the lambda as trigger and adding auth access allows successful push.

Expected behavior

Push should succeed with the lambda as a stream trigger with auth access.

Reproduction steps

% node -v
v20.12.2

% amplify --version
12.10.1

% mkdir testapp && cd $_

% amplify init

add default auth

% amplify add auth
Do you want to use the default authentication and security configuration? Default configuration
How do you want users to be able to sign in? Username
Do you want to configure advanced settings? No, I am done.

add Todo GraphQL api

% amplify add api
Select from one of the below mentioned services: GraphQL
Here is the GraphQL API that we will create. Select a setting to edit or continue Continue
Choose a schema template: Single object with fields (e.g., “Todo” with ID, name, description)

add a function as DynamoDB trigger

% amplify add function
Select which capability you want to add: Lambda function (serverless function)
Provide an AWS Lambda function name: dbtriggerfunction
Choose the runtime that you want to use: NodeJS
Choose the function template that you want to use: Lambda trigger
What event source do you want to associate with Lambda trigger? Amazon DynamoDB Stream
Choose a DynamoDB event source option Use API category graphql @model backed DynamoDB table(s) in the current Amplify project
Selected resource
Selected @model Todo
? Do you want to configure advanced settings? No
? Do you want to edit the local lambda function now? No

deploy successfully

% amplify push -y

update the function to add reading auth permission

% amplify update function
? Select the Lambda function you want to update dbtriggerfunction
? Which setting do you want to update? Resource access permissions
? Select the categories you want this function to have access to. auth
? Select the operations you want to permit on dbtriggerfunction read
? Do you want to edit the local lambda function now? No

fail to deploy

% amplify push -y

creating with adding permission works fine

% amplify remove function dbtriggerfunction
% amplify add function
? Select which capability you want to add: Lambda function (serverless function)
? Provide an AWS Lambda function name: dbtriggerfunction
? Choose the runtime that you want to use: NodeJS
? Choose the function template that you want to use: Lambda trigger
? What event source do you want to associate with Lambda trigger? Amazon DynamoDB Stream
? Choose a DynamoDB event source option Use API category graphql @model backed DynamoDB table(s) in the current Amplify project
Selected resource
Selected @model Todo
? Do you want to configure advanced settings? Yes
? Do you want to access other resources in this project from your Lambda function? Yes
? Select the categories you want this function to have access to. auth
? Select the operations you want to permit on dbtriggerfunction read
? Do you want to invoke this function on a recurring schedule? No
? Do you want to enable Lambda layers for this function? No
? Do you want to configure environment variables for this function? No
? Do you want to configure secret values this function can access? No
✔ Choose the package manager that you want to use: · NPM
? Do you want to edit the local lambda function now? No

deploy successfully

% amplify push -y

Project Identifier

No response

Log output

# Put your logs below this line


Additional information

No response

Before submitting, please confirm:

  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
  • I have removed any sensitive information from my code snippets and submission.
@subhayum-amplify subhayum-amplify added the pending-triage Issue is pending triage label Apr 26, 2024
@ykethan
Copy link
Contributor

ykethan commented Apr 26, 2024

Hey @subhayum-amplify, thank you for the reaching out. I was able to reproduce the issue, marking as bug.

@ykethan ykethan added bug Something isn't working functions Issues tied to the functions category p2 and removed pending-triage Issue is pending triage labels Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working functions Issues tied to the functions category p2
Projects
None yet
Development

No branches or pull requests

2 participants