Hello Michael! When we are using IAM update from lambda functions, the subscription query returns only empty data. I have followed your example and below is the subscription return value "onUpdateOrder: {status: null}" from reactJs side.
Please let me know how to solve this issue. Update data is working fine from lambda function. i have confirmed the data with our DynamoDB.
Hi Michael!
When we using the IAM update from lambda function the subscription query return the empty data. I have followed the your example. and subscription return value is onUpdateOrder: {status: null} from reactJs side. Please let me know how to solve this issues. update data working fine from lambada function inside. i have confirmed data with Dynamodb side.
Hi Michael Liendo!
I think you have an error in your cdk routine, on line 49:
rule.addTarget(new targets.LambdaFunction(sampleFuncToAppSync)) I think the attribute/var that is passed to LambdaFunction should be "coffeeOrderReceivedFunc".
On the other hand, I have not been able to do something almost identical, in my case it is using the eventPattern aws.s3. the trigger is not added inside my lambda function, therefore it is not called when eventbridge detects the event from s3.
I've read a lot about this and am about to conclude that it's not possible to use addTarget on previously created resources from the amplify CLI, or at least not this command. This only works for resources created on the same CDK stack, apparently...
At the end of the Importing existing external resources section in /cdk/v2/guide/resources.html, says:
"Although you can use an external resource anywhere you'd use a similar resource defined in your app, you cannot modify the external resource. For example, calling addToResourcePolicy (Python: add_to_resource_policy) on an external s3.Bucket does nothing."
In your case, has it worked for you?
Thanks a lot and best regards.
Hi Michael!
I'm using Amplify on the frontend and it provides an API class to make Cognito authenticated requests. What is the recommended approach to make requests in a Node.js Lambda function with IAM? Amplify refers to this: docs.amplify.aws/lib/graphqlapi/graphql-from-node…
That looks quite similar to your post. I was wondering if I also could use the official AWS AppSync SDK?
Andrew Plater
Making the complex simple
Very helpful explanation for what I am trying to do with AWS EventBridge calling a Lambda function and updating subscriptions