You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 projectSelected 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 projectSelected 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
Additional information
No response
Before submitting, please confirm:
The text was updated successfully, but these errors were encountered: