Serverless Aurora Database and AWS Lambda

แชร์
ฝัง
  • เผยแพร่เมื่อ 19 ม.ค. 2025

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

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

    Thanks for simple explanation.

  • @RajeshA-f3u
    @RajeshA-f3u 11 หลายเดือนก่อน

    Looks great.
    Can you create a service which can consume database (prefer Aurora RDS ) CRUD operations events and pass to a lambda function to trigger a notification.

    • @EndreSynnes
      @EndreSynnes  10 หลายเดือนก่อน

      Thank you so much!😄 I’m not sure exactly what you mean, do wonder if you can perform CRUD operations to an Aurora RDS database from a lambda function, or do you want a lambda function to somehow listen to CRUD operations against an RDS database performed by some other application? Please let me know if I misunderstood 😄

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

    Followed your instructions and got "errorMessage": "An error occurred (AccessDeniedException) when calling the ExecuteStatement operation:

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

      Hi 😊
      I see, have you attached an IAM policy to your Lambda execution role, containing the necessary permissions to communicate with your RDS Aurora database?

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

    Do you know If is possible to return column names instead data types?

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

      Well, that's a good question. I have wondered about that myself 🤔 I have yet to find a good solution to this, when calling RDS using boto3. I guess you could map the fields in the response you get from the database to variables names based on the position in the response object, but this is not a very pretty solution in my opinion. I'll look into this to see if can find a better solution!😄

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

      Hi, sorry for the late response. You have probably figured out a solution for this by now, but I thought I could share what I found anyways😄 The boto3 library is quite limited when it comes to mapping response objects from the Serverless Aurora Data API. As mentioned in this (stackoverflow.com/questions/56822170/aws-rds-data-api-executestatement-not-return-column-names) stack overflow thread, there is a npm package called data-api-client (www.npmjs.com/package/data-api-client) which seems to alleviate some of these issues or limitations. This is for JavaScript of course, but there seems to be some alternatives for Python as well ( pypi.org/project/aurora-data-api/ and github.com/koxudaxi/py-data-api ). I have not yet tested them myself do. I hope this was useful in some way!😄

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

    How do i get row names,I mean column names insted of stringvalues

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

      Hi, this is an issue I've been trying to solve myself. Maybe the answer I gave on the comment from @FábioEduardo could help? 😄

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

    great! may you talk about princing? thank you

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

      Thanks!😊 yes, pricing in Aurora could be a topic for another video 😄 It's especially interesting with the introduction of serverless Aurora databases.

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

    is the lbda inside the vpc or not

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

      Hi 😄
      No, the lambda function is not in the same VPC as the Aurora Serverless Database. This is one of the cool features of the Aurora DataAPI. It enables you to communicate with the Database without having to launch the Lambda function in the same VPC.
      You can read more about this in the AWS documentation: docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html

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

    Hi, nice video,
    I built a the same thing what you had showed in the video. But i built it using CDK in python.
    Instead of providing lambda with whole RDS permission, I added inline policy To lambda role with secretmanager secret value and rds-data permission.
    I tried to add a lambda rest api gateway for the lambda function.
    So that I can trigger the lambda endpoint and get the records from table.
    But i met with an error as "BadRequestException, when calling the executestatement operation. Access denied for user admin @ 10.x.x.x' (using password: YES)
    I have not deployed my lambda inside the vpc since it's not necessary.

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

      Hi, I like that you make use of AWS CDK!🙌😄
      I'm not sure what the issue can be, but you have remembered to enabled the Data-API feature for your Serverless Aurora database? Also, maybe these troubleshooting steps can help: aws.amazon.com/premiumsupport/knowledge-center/rds-mysql-access-denied/
      Let me know if this was of any help!

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

      @@EndreSynnes hey endre, i was able to solve the issue by reconfiguring the permission and redeploying the stack.
      And yeah cdk is awesome.

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

      Awesome!😄👍
      I'll see if I can make a video about CDK at some point.