-
-
Notifications
You must be signed in to change notification settings - Fork 81
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
Unable to connect to DynamoDB using Lambda Runtime #595
Comments
I removed your Sorry here are a load of questions first?
If you create your service as follows
it will output all the HTTP requests made to AWS which might give you an idea where things are going wrong. Instead of using static credentials I would use environmental credentials. This will pickup the credentials the lambda is running with and the execution role will define what AWS assets you can access. Although when you run locally you will need to setup the environment variables |
Thanks a lot @adam-fowler. Reason of Issue: Actually my TableName was wrong. I can't believe this bcz I created table with name: ToDoItems using Amplify but by default Amplify created Table with name ToDoItems-3f4asanedaneku32kaqy-dev. and so I was trying to access ToDoItems. Note:- As AWS Cli was not setup in my system so I setup and found the error of |
Hi @adam-fowler. I uploaded same project zip to AWS and checked in cloudWatch and got this error:
I checked my permissions in Lambda and its all good as The error doesn't describe about anything about permission issue. |
That looks like a setup issue. It thinks your lambda is node.js. It's worthwhile reading this blog to make sure you have everything setup correctly https://fabianfett.dev/getting-started-with-swift-aws-lambda-runtime. Especially Step 7 onwards |
@adam-fowler Thnx for solution but this was not helpful bcz I wanted to fix something about setup in AWS and i fixed it. Solution: Make sure you have selected Custom runtime on Amazon Linux 2. instead of Node.js in Runtime Setting. |
I am unable to fetch Data from DynamoDB with Lambda Runtime using Local Testing.
To Reproduce
Steps to reproduce the behavior:
{"errorType":"FunctionError","errorMessage":"ResourceNotFoundException: Requested resource not found"}
and I Xcode console I am getting error:warning Lambda : lifecycleIteration=0 lambda handler returned an error: ResourceNotFoundException: Requested resource not found
Expected behavior
When hitting API I should get data from DynamoDB.
Setup (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: