Closed VicFrolov closed 2 years ago
Hi @VicFrolov 👋 We have since updated our graphql transformer to v2 so I'm wondering if you're still experiencing this issue and looking for a solution.
Curious if this was the first model you had used an IAM
auth rule on. There might be some issues with the way the auth resource is configured to allow unauthenticated logins (Identity Pool).
Otherwise, if you might still be able to reproduce this and have error logs from the front end or Cloudwatch, please do share.
Hi 👋 Closing this as we have not heard back from you. If you are still experiencing this issue and in need of assistance, please feel free to comment and provide us with any information previously requested by our team members so we can re-open this issue and be better able to assist you.
Thank you!
Hi, I'm wondering if @aws_cognito_user_pools still works in the V2 for lambda pipelines or if we have to replace it by { allow: private } ? Because since I migrated to V2 I can't access to my lambdas through the existing pipes, saying "message: "Not Authorized to access lambda1Pipeline on type AWSJSON" In V1 I was doing that :
type Mutation {
lambda1Pipeline(data: AWSJSON): AWSJSON @function(name: "lambda1-${env}") @aws_cognito_user_pools
}
This doesn't work either :
type Mutation {
lambda1Pipeline(data: AWSJSON): AWSJSON @function(name: "lambda1-${env}") @auth(rules: [{ allow: private }])
}
Thank you.
This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.
Looking for a help forum? We recommend joining the Amplify Community Discord server amplify-help
forum.
Before opening, please confirm:
JavaScript Framework
React Native
Amplify APIs
Authentication, GraphQL API
Amplify Categories
auth, function
Environment information
Describe the bug
Custom resolver is working perfectly when logged in as a user using cognito auth, but when using IAM, is 401'd.
I followed these steps, and my code is:
I checked the build folder, and it seems to be the same auth logic as the other @searchable functions I have:
I have dozens of other queries, both autogenerated and manual functions, all work without issues, aside for this one new function I added.
Expected behavior
User is able to get data when authenticated via @aws_iam
Reproduction steps
follow steps outlined in documentation link above, and ensure to use aws_iam auth, e.g. with apollo auth link:
Code Snippet
Log output
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