How to send an email with Amazon SES and Serverless - tutorial

แชร์
ฝัง

ความคิดเห็น • 75

  • @gabrielesanguigno7361
    @gabrielesanguigno7361 3 ปีที่แล้ว +3

    One of the few really great tutorials on AWS, well done

    • @CompleteCoding
      @CompleteCoding  3 ปีที่แล้ว

      Thanks Gabriele, That means a lot

  • @mpazaryna
    @mpazaryna 4 ปีที่แล้ว +2

    Thank you very much, this was very useful and easy to follow. I've just subscribed and I'm looking forward to more. Best of luck to you!

  • @MICAELAABIGAILGORDILLOALCOCER
    @MICAELAABIGAILGORDILLOALCOCER ปีที่แล้ว

    Thank you very much, you saved my project ☺

  • @venkykrishnan2028
    @venkykrishnan2028 2 ปีที่แล้ว +1

    Thanks for this Sam, simple nice video !!!

  • @khandoor7228
    @khandoor7228 3 ปีที่แล้ว +2

    Great video Sam Thank you!

  • @samthetester8099
    @samthetester8099 4 ปีที่แล้ว +3

    Wow, Thanks for the tutorial. This is what I was looking for........

    • @CompleteCoding
      @CompleteCoding  4 ปีที่แล้ว +1

      Thats a great idea. I'll add it to the list of future videos :)

  • @abhinavsinghal5486
    @abhinavsinghal5486 3 ปีที่แล้ว

    Great tutorial , really appreciate it. I see that you have used an existing project. Is it possible to guide what was the first project where you did the initial setup i.e myserverless project

    • @CompleteCoding
      @CompleteCoding  3 ปีที่แล้ว +1

      This all comes from the first few videos in this playlist
      th-cam.com/play/PLmexTtcbIn_gP8bpsUsHfv-58KsKPsGEo.html

  • @madara_u_chiha
    @madara_u_chiha 2 ปีที่แล้ว

    Amazing video!

  • @abdelhadidjafer7004
    @abdelhadidjafer7004 2 ปีที่แล้ว

    Hi sam , amazing job again , wroth to note after the aws changes there has to be some extra console configuration to work, by just adding some extra permission to the email verified

    • @CompleteCoding
      @CompleteCoding  2 ปีที่แล้ว +1

      Thanks for the info! AWS changes so often

  • @zachwhite8054
    @zachwhite8054 4 ปีที่แล้ว

    awesome video. thank you

    • @CompleteCoding
      @CompleteCoding  4 ปีที่แล้ว

      Thanks Zach. Glad you enjoyed it

  • @amarnathmanikandan3693
    @amarnathmanikandan3693 2 ปีที่แล้ว

    Using serverless.yml configuration how can I create a SES email configuration that is linked/configured with a cognito user pool and its mapped to S3 bucket. Please help if you have any info regarding this ?

  • @JC-vh7vy
    @JC-vh7vy 3 ปีที่แล้ว

    Extension are yuou using that lets you navigate the funcions of the file?

    • @CompleteCoding
      @CompleteCoding  3 ปีที่แล้ว +1

      That is just part of vs code. It is "view function" which is defaulted to f12 I think.

  • @RohitPal-lz1wf
    @RohitPal-lz1wf 3 ปีที่แล้ว

    Great stuff mate. Can you please setup this with using Express framework because i was using that technique but somehow not working for me.

    • @CompleteCoding
      @CompleteCoding  3 ปีที่แล้ว

      It depends how you are using express. If you are running express in a Lambda then it should all work.
      If you are running the express locally or hosting it somewhere then it won't have permissions to use the AWS services in that AWS account. You could create a 'ses-user' and then use the credentials with the AWS-SDK in the code, but this is a lot more effort than just using Serverless.

  • @threeone6012
    @threeone6012 3 ปีที่แล้ว

    Well done.

  • @Gaurav2964
    @Gaurav2964 3 ปีที่แล้ว

    This works when I run it locally. But doesn't work when I deploy it on AWS and try running it from there. I have created an IAM policy, and used policy's ARN in my serverless yml file to allow sending emails

    • @CompleteCoding
      @CompleteCoding  3 ปีที่แล้ว

      You should just be able to add something like this to your serverless.yml file in the provider section and that will give your lambda the permissions it needs.
      iamRoleStatements:
      - Effect: Allow
      Action:
      - ses:*
      Resource: '*'

  • @ahasibrifat7568
    @ahasibrifat7568 2 ปีที่แล้ว

    10:15 does it gives permission all other lambdas to send email?? possible to make role lambda specific?

    • @CompleteCoding
      @CompleteCoding  2 ปีที่แล้ว +2

      Yes, this is for all lambdas. setting up lambda specific permissions is a bit much for this video
      there's a plugin called `serverless-iam-roles-per-function` which does exactly what you want and is what I use when we have to have very fine control over IAM permissions.

  • @neosarchizo
    @neosarchizo 4 ปีที่แล้ว +1

    Good! How can I check the endpoints I generated before?

    • @CompleteCoding
      @CompleteCoding  4 ปีที่แล้ว +1

      There are a few ways to test your functions before deployment. Serverless offline can work for a few things but things like SES won't work.
      You could write unit tests and check that way.
      Often the easiest way is to deploy them and just check. You then have a development branch which deploys to the dev stage and master which deploys to prod. This way you get two separate environments

    • @neosarchizo
      @neosarchizo 4 ปีที่แล้ว

      @@CompleteCoding Thanks for the reply. But I asked it wrongly. Sorry. I wanna recheck my endpoints URL that I generated already.

  • @txtinc9823
    @txtinc9823 3 ปีที่แล้ว

    Hi Complete Coding, I have followed your tutorial but everytime I send an email out, the bounce rate is followed increasing. How can I solve it?
    I have added an unsubscribe link at the bottom of the email but still no luck to stop the bounce rate incresed.
    *Could you also teach us how can we avoid or minimise the bounce rate.

    • @CompleteCoding
      @CompleteCoding  3 ปีที่แล้ว

      I'm not en expert on email optimisation but from what I have learnt it is normally due to the content of the email and if other recipients have classed it as spam.
      To get less bounce, make sure that the people who send it to are likely to open it. This might mean only sending it to a smaller group who you know will open it. The more people open it, the less likely it is to be classed as spam. Over time Gmail (or other email clients) will learn that it isn't spam.
      Make sure you're only sending emails to users who have said that they want to get the emails.
      If you are sending the same email to lots of people (newsletter) then you would be better using a different service who specialises in bulk emailing (mailgun).

  • @janituma9769
    @janituma9769 3 ปีที่แล้ว

    What if a customer response to the email ? It will not work because of SMTP right ? What to configure to receive emails ?

    • @CompleteCoding
      @CompleteCoding  3 ปีที่แล้ว

      Amazon SES also has the ability to receive emails and I've built a full email customer service tool before. This is a lot more complex than sending an email and involves activating a domain name on your account.

  • @saiswaroopbedamatta7747
    @saiswaroopbedamatta7747 2 ปีที่แล้ว

    Hi thanks for this amazing video, I have a query, how can i send an email template from ses ? Can i do this it this method ? please help.

    • @CompleteCoding
      @CompleteCoding  2 ปีที่แล้ว

      Yes you can. You can have your template either in the lambda or stored in S3. You then just insert the values you want and then send the sdk call
      const params = {
      ...,
      Message: {
      Body: {
      Html: {
      Charset: "UTF-8",
      Data: "HTML_FORMAT_BODY - GENERATED FROM YOUR TEMPLATE"
      },
      }}}

    • @saiswaroopbedamatta7747
      @saiswaroopbedamatta7747 2 ปีที่แล้ว

      @@CompleteCoding I have my template at ses email template, can it be used from there ?

  • @indianappguy
    @indianappguy 3 ปีที่แล้ว

    I am beginner to this if you have in depth tutorial please guide me

    • @CompleteCoding
      @CompleteCoding  3 ปีที่แล้ว

      Here's a link to my Full Serverless playlist. If you're starting out then it will teach you everything you need th-cam.com/play/PLmexTtcbIn_gP8bpsUsHfv-58KsKPsGEo.html

  • @indianappguy
    @indianappguy 3 ปีที่แล้ว

    I followed same i am getting Internal server error

    • @CompleteCoding
      @CompleteCoding  3 ปีที่แล้ว

      Have a look in the logs of your lambda and see what the issue is. It might be a typo or that you haven't enabled the email address or something else.

  • @srav9096
    @srav9096 3 ปีที่แล้ว

    Can we verify the email/domain with serverless ?

    • @CompleteCoding
      @CompleteCoding  3 ปีที่แล้ว

      Unfortunately not. If you are verifying an email then it needs to be done directly in SES. If you're verifying a domain then that's done in Route53 (or if you buy the domain from route53)

  • @anasamhawech647
    @anasamhawech647 4 ปีที่แล้ว +1

    still work !

  • @amazonses2978
    @amazonses2978 4 ปีที่แล้ว +2

    Not bad

    • @CompleteCoding
      @CompleteCoding  4 ปีที่แล้ว +1

      Thanks! That means a lot coming from you :D

  • @varunteja8204
    @varunteja8204 ปีที่แล้ว

    I am not getting data from postman to event.

    • @CompleteCoding
      @CompleteCoding  ปีที่แล้ว

      Are you remembering to stringify the response object?

  • @riazahmad5975
    @riazahmad5975 ปีที่แล้ว

    please make video on how to make email template and send email ..

    • @CompleteCoding
      @CompleteCoding  ปีที่แล้ว

      You could store your email templates in S3 or Dynamo ( as html) then just add your variables and send it this same way

  • @artofcode7
    @artofcode7 3 ปีที่แล้ว

    My emails is going to span... How can i fix it?

    • @CompleteCoding
      @CompleteCoding  3 ปีที่แล้ว

      This is because google (or other email providers) aren't expecting emails from your email address to come from AWS. The way to improve this is to have more users mark the email as 'not spam'.
      Because it is so easy to send thousands of emails, spam marketers have abused it so email providers have learnt that they're often spam.
      Other ways to reduce the spam rate is to use a business email address with a reputable domain name and not just a name@gmail.com address to send from.

  • @first8208
    @first8208 4 ปีที่แล้ว

    any source code or git-hub repository?

    • @CompleteCoding
      @CompleteCoding  4 ปีที่แล้ว

      Hi Jaber. I've also added it to the description.Thanks for point that out
      github.com/SamWSoftware/ServerlessTH-camSeries/tree/l12-ses

    • @first8208
      @first8208 4 ปีที่แล้ว

      @@CompleteCoding very much appreciated... thnx : )

  • @abdoualgerian5396
    @abdoualgerian5396 3 ปีที่แล้ว

    where is the previous videos !!!! please label them with nimbers

    • @CompleteCoding
      @CompleteCoding  3 ปีที่แล้ว

      Check out the playlist for all videos in order th-cam.com/play/PLmexTtcbIn_gP8bpsUsHfv-58KsKPsGEo.html

  • @ngneerin
    @ngneerin 3 ปีที่แล้ว

    Use joi for input validation

    • @CompleteCoding
      @CompleteCoding  3 ปีที่แล้ว

      There are some really good libraries for data validation. In these videos I try and focus on one thing (SES) and data validation can be so complex it could have its own video.

    • @ngneerin
      @ngneerin 3 ปีที่แล้ว

      @@CompleteCoding looking forward to that tut

  • @khushbookabra1354
    @khushbookabra1354 3 ปีที่แล้ว

    Sir i need your help...if possible for you then please help!!!!

    • @CompleteCoding
      @CompleteCoding  3 ปีที่แล้ว +1

      What do you need help with?

    • @khushbookabra1354
      @khushbookabra1354 3 ปีที่แล้ว

      @@CompleteCoding I had done with sending of Emails with Aws (code in NodeJs without using serverless).....But i m not getting records to whom i had send the Emails?????.....And i also want to receive Emails with attachments and stored in Database, how i have to proceed for that??????

  • @lucassmith6902
    @lucassmith6902 3 ปีที่แล้ว

    Can you help me to get AWS ACCOUNT I we pay 💰 money

    • @CompleteCoding
      @CompleteCoding  2 ปีที่แล้ว

      Getting an AWS account is pretty simple. There are a lot of tutorials on how to do it out there