Hello. thanks for the video, very cool! but I, like some others, had an error of 500 and cors. then after many hours of searching and trying to cure the disease, I found 2 solutions that helped me. 1- for the function, make node 16 version, because the higher version does not know AWS-SDK. 2-give full access for SES. now everything works as expected
Thank you for this tutorial. It helped me get up and running with SES on my latest project! Would love to see more cloud computing topics, you present them in an easy to understand way.
I'm glad the videos helped ya out. Ngl that'd pretty much all the knowledge I have on cloud computing 🤣 but when I learn more I'll definitely teach about it
I am getting an internal server error 500. Do i need to attach any other policy to lambda function like "lambda:InvokeFunction" for API gateway to access my Lambda function?
Great tutorial, appreciated. I am however getting a CORS policy error ...has been blocked by CORS policy: Response to preflight request doesn't pass access control check: It does not have HTTP ok status. Any ideas?
@Arslan hey! following your tutorial and ran in to an issue. Getting internal server error 500 and through some debugging I was able to figure out that the error is coming from my lamda trying to access event.body.message and other items in the event and them not being there ie the object I am sending in my fetch is not making it to my lamda function. Any help would be really appreciated.
Try logging the event and body individually and check what that returns maybe event.body.message just didn't exist other than that make sure the packages are correct in the lambda
Hello, very helpful video, but i am getting the following error : "errorMessage": "Error: Cannot find module 'aws-sdk' Require stack: - /var/task/index.js - /var/runtime/index.mjs", "trace": [ "Runtime.ImportModuleError: Error: Cannot find module 'aws-sdk'",. Any help would be really appreciated
No ideally you would only need to compress the back end stuff that's why we made a separate project and then we compressed that project and put it into our Lambda
@@arslan99 Ok thank you. I tried also to change the email address of the recepient. But it does'nt work. It only works when I put the same adress for "senderName" & "senderEmail"
@@ybchl1090 yes those are weird bug that I also encountered I found that if you specifically request the end user who submitting the form to give their email address is what most people already do and you can actually access that data as well. What most forms have is the same sender and receiving email but inside of the actual email body contains who sent that email if that makes sense
@@arslan99 Ok so I should first add a new Identity on AWS before I can use an address ? Or it is not necessary ? Another problem I encountered, is that the PDF file I sent, it's not readable. Idk why
@@ybchl1090 you would need to add the email address to ses and then you can just use that email address in your lambda. I'm not sure why that pdf issue is occurring
Well you need an actual way to process the email itself so let's say you have attachments and whatnot you need to be able to process all that information and doing it only through SES it doesn't work all the time
@@arslan99 Fair enough. If I understand it correctly, nodemail is giving you a high level api for managing parameters and attachments? is that what you are saying? Nevertheless it is not mandatory but it encapsulates complex implementation details? I am not familiar with AWS_SDK api for SES. My first thought was that it had already a simplified api for sending all kind of emails including attachments, html, etc...
In my case I am using PHPmailer, and had an additional smtp server relay to SES, which it might not be necessary since PHPmailer would be doing what nodemail is doing in your example, correct?
Hello Arsian, I have the same error that other viewers.. I receive the following error: { "errorType": "SyntaxError", "errorMessage": "Unexpected token u in JSON at position 0", "trace": [ "SyntaxError: Unexpected token u in JSON at position 0", " at JSON.parse ()", " at Runtime.exports.handler (/var/task/index.js:7:83)", " at Runtime.handleOnce (file:///var/runtime/index.mjs:548:29)" ] } I was verified permissions and it is ok. I followed all your instructions but the error persist. Could you explain me how I can test this in postman for example? or can you how should be the payload to can test in postman. Thank yoy very much for your help.
The best way to test it in post man is to make your API public or take the auth token and send a basic request in string form to your API and try to see if cloud front actually returns something but that specific error means the actual JSON is incorrect if I remember correctly
@@gabrielhernandez8190 unfortunately I'm not infront of my computer rn but if I get infront of one soon I can. I honestly just recommend refollowing the tutorial
hello friend, I receive this error, I followed the example as is but it does not compile. I try directly from the function. { "errorType": "SyntaxError", "errorMessage": "Unexpected token u in JSON at position 0", "trace": [ "SyntaxError: Unexpected token u in JSON at position 0", " at JSON.parse ()", " at Runtime.exports.handler (/var/task/index.js:5:53)", " at Runtime.handleOnce (/var/runtime/Runtime.js:66:25)" ] }
Okay so from my guess on that error I think you aren't actually receiving any data from your api gateway. If you try to just console log the result you get from the API that may tell you what's wrong if you don't get any info from the API than it may not have been configured properly or used properly in your react app. If it is returning a console log than consider re-doing the lambda portion of this tutorial. I hope this helps
Even I am receiving this error when I try to test this using AWS test event. Using reactjs application and postman, I am getting 500internal server error
Hello. thanks for the video, very cool! but I, like some others, had an error of 500 and cors.
then after many hours of searching and trying to cure the disease, I found 2 solutions that helped me. 1- for the function, make node 16 version, because the higher version does not know AWS-SDK. 2-give full access for SES.
now everything works as expected
Thank you for this tutorial. It helped me get up and running with SES on my latest project! Would love to see more cloud computing topics, you present them in an easy to understand way.
I'm glad the videos helped ya out. Ngl that'd pretty much all the knowledge I have on cloud computing 🤣 but when I learn more I'll definitely teach about it
Awesome..! authetic n DETAILED
Very well explained. Thank you for your detailed explanation.
Np
Thank you Arslan. On point. No bs... Thanks man.
Np glad I could help
That's really a great tutorial, cheers mate! Not even 10K views, very unterrated!
Gracias Arsian!!!!, estaba buscando esto como loco!! me ayudaste mucho! eres un crack!
I dont speak Spanish but I assume you're saying you liked it 😃🤣
I am getting an internal server error 500. Do i need to attach any other policy to lambda function like "lambda:InvokeFunction" for API gateway to access my Lambda function?
it's been a while since I've used aws for this so im not too sure sorry
Great video, thanks!
Thank you! I learned a lot!
Great tutorial, appreciated.
I am however getting a CORS policy error
...has been blocked by CORS policy: Response to preflight request doesn't pass access control check: It does not have HTTP ok status.
Any ideas?
Oh that's a common error in axios
stackoverflow.com/questions/50949594/axios-having-cors-issue
Thanks man!
Happy to help!
@Arslan hey! following your tutorial and ran in to an issue. Getting internal server error 500 and through some debugging I was able to figure out that the error is coming from my lamda trying to access event.body.message and other items in the event and them not being there ie the object I am sending in my fetch is not making it to my lamda function. Any help would be really appreciated.
Try logging the event and body individually and check what that returns maybe event.body.message just didn't exist other than that make sure the packages are correct in the lambda
@@arslan99 I have the same error
Thank you
Np
Hello, very helpful video, but i am getting the following error : "errorMessage": "Error: Cannot find module 'aws-sdk'
Require stack:
- /var/task/index.js
- /var/runtime/index.mjs",
"trace": [
"Runtime.ImportModuleError: Error: Cannot find module 'aws-sdk'",. Any help would be really appreciated
It means your AWS SDK is not installed please retry the tutorial where I setup AWS sdk
@@arslan99 but the tutorial said that Lambda install it itself ...... I have the same error
Off the top of my head then I'm not too sure sorry
Hello brother, its a fantastic video. Do u have a video for graphql Schema for Version 2 through aws api?
I'm glad you enjoyed it. I'm sorry I don't have that video
Do we have to compress all the project ? It includes the backend and frontend part ... ?
No ideally you would only need to compress the back end stuff that's why we made a separate project and then we compressed that project and put it into our Lambda
@@arslan99 Ok thank you. I tried also to change the email address of the recepient. But it does'nt work. It only works when I put the same adress for "senderName" & "senderEmail"
@@ybchl1090 yes those are weird bug that I also encountered I found that if you specifically request the end user who submitting the form to give their email address is what most people already do and you can actually access that data as well. What most forms have is the same sender and receiving email but inside of the actual email body contains who sent that email if that makes sense
@@arslan99 Ok so I should first add a new Identity on AWS before I can use an address ? Or it is not necessary ?
Another problem I encountered, is that the PDF file I sent, it's not readable. Idk why
@@ybchl1090 you would need to add the email address to ses and then you can just use that email address in your lambda. I'm not sure why that pdf issue is occurring
Why do you need to use nodemail inside the lambda as intermediary? Wouldn't it be possible to just send the email directly to SES?
Well you need an actual way to process the email itself so let's say you have attachments and whatnot you need to be able to process all that information and doing it only through SES it doesn't work all the time
@@arslan99 Fair enough. If I understand it correctly, nodemail is giving you a high level api for managing parameters and attachments? is that what you are saying? Nevertheless it is not mandatory but it encapsulates complex implementation details? I am not familiar with AWS_SDK api for SES. My first thought was that it had already a simplified api for sending all kind of emails including attachments, html, etc...
In my case I am using PHPmailer, and had an additional smtp server relay to SES, which it might not be necessary since PHPmailer would be doing what nodemail is doing in your example, correct?
@@TheRcfrias I've never used phpmailer so I can't say anything about that but if it does the same job as node mailer than it should be fine
how do you send text
Lemme see if I can make a tutorial on that 😁
was trying to do amplify ses on insert :S but i cant even get this to work >< i keep trying thank you for your work
Please create video on contact page
Wym contact page?
Can I have your insta telegram id?
i am getting an internal server error
On your lambda or app?
nope 500 error
What else does the error give besides 500? Was the error in your lambda?
@@arslan99 hi ( : can see it says lambda error count 3 but just trying to see where logs are googling it. but its 500 in network tab console
@@arslan99 might be because sdk already included i retry
could also be the order of props
do you have a pastebin of your code? I'm not too sure too sure without seeing it
Hello Arsian, I have the same error that other viewers.. I receive the following error:
{
"errorType": "SyntaxError",
"errorMessage": "Unexpected token u in JSON at position 0",
"trace": [
"SyntaxError: Unexpected token u in JSON at position 0",
" at JSON.parse ()",
" at Runtime.exports.handler (/var/task/index.js:7:83)",
" at Runtime.handleOnce (file:///var/runtime/index.mjs:548:29)"
]
}
I was verified permissions and it is ok. I followed all your instructions but the error persist. Could you explain me how I can test this in postman for example? or can you how should be the payload to can test in postman. Thank yoy very much for your help.
The best way to test it in post man is to make your API public or take the auth token and send a basic request in string form to your API and try to see if cloud front actually returns something but that specific error means the actual JSON is incorrect if I remember correctly
@@arslan99 Thanks for your answer... in this case, could you have an example of this json?
@@gabrielhernandez8190 unfortunately I'm not infront of my computer rn but if I get infront of one soon I can. I honestly just recommend refollowing the tutorial
hello friend, I receive this error, I followed the example as is but it does not compile. I try directly from the function. {
"errorType": "SyntaxError",
"errorMessage": "Unexpected token u in JSON at position 0",
"trace": [
"SyntaxError: Unexpected token u in JSON at position 0",
" at JSON.parse ()",
" at Runtime.exports.handler (/var/task/index.js:5:53)",
" at Runtime.handleOnce (/var/runtime/Runtime.js:66:25)"
]
}
Is this error from lambda?
@@arslan99 Yes
Okay so from my guess on that error I think you aren't actually receiving any data from your api gateway. If you try to just console log the result you get from the API that may tell you what's wrong if you don't get any info from the API than it may not have been configured properly or used properly in your react app. If it is returning a console log than consider re-doing the lambda portion of this tutorial. I hope this helps
@@arslan99 The error persists, I'll find another way. Thanks a lot.
Even I am receiving this error when I try to test this using AWS test event. Using reactjs application and postman, I am getting 500internal server error