#✅ - Lambda Function into Amplify

1 messages · Page 1 of 1 (latest)

crystal hare
#

I have a lambda function that works well to keep my data retrieval in the backend but since it is my first time using lambda with Amplify I am wondering, is it better to use the lambda function that I made using the lambda portal or just try to implement the lambda function using amplify's backend, similar to https://docs.amplify.aws/javascript/build-a-backend/functions/set-up-function/ this doc?

The function logic is using an input from the user in the frontend, taken to the lambda function to AWS Cognito to retrieve user info then that user info is used to access AWS S3 data and return it back to the frontend for the user to access.

elfin apex
#

hey, you can provide permission to the function to
access auth.
https://docs.amplify.aws/react/build-a-backend/auth/grant-access-to-auth-resources/
to invoke the function you will need to rely on a API. if you are already using Amplify data/graphql you can attach the function and call using a query. or you can setup a rest api/api gateway.

but curious on this strategy as you can direclty use the Amplify js library with cognito owner or authenticated access to retrive the data from the frontend

vernal kestrelBOT
#

✅ - Lambda Function into Amplify