{"id":1864,"date":"2018-08-27T12:32:10","date_gmt":"2018-08-27T07:02:10","guid":{"rendered":"http:\/\/www.aqbsolutions.com\/?p=1864"},"modified":"2025-04-18T04:52:04","modified_gmt":"2025-04-18T04:52:04","slug":"save-data-in-an-aws-rds-database-using-aws-lambda","status":"publish","type":"post","link":"https:\/\/aqbsolutions.com\/blog\/2018\/08\/27\/save-data-in-an-aws-rds-database-using-aws-lambda\/","title":{"rendered":"Save data in an AWS RDS Database using AWS Lambda"},"content":{"rendered":"<p>If you want a small service that accesses database and performs certain operations such as returning data, you can use an AWS Lambda since it will cost you only when it is invoked.T his way, you will be paying less than an ec2 instance.<\/p>\n<p>In this tutorial, you will see how you can use an AWS Lambda function that saves data in a table in an MYSQL database created using the AWS RDS service. You can perform the following steps to do the same:<\/p>\n<p><strong>\u00a0<\/strong><\/p>\n<p><strong>Step 1: Create a Mysql database using AWS RDS<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2143\" src=\"http:\/\/www.aqbsolutions.com\/wp-content\/uploads\/2018\/08\/image001-1024x498-800x389.png\" alt=\"\" width=\"800\" height=\"389\" \/><\/p>\n<p>Click on <strong>Create database<\/strong> button which will take you to the next page in the process of creating a database<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2144\" src=\"http:\/\/www.aqbsolutions.com\/wp-content\/uploads\/2018\/08\/image0031-1024x498-800x389.png\" alt=\"\" width=\"800\" height=\"389\" \/><\/p>\n<p>This page allows you to select the database engine from the options given. We have chosen MySQL since we would be creating a MySQL table which would be accessed by our Lambda function.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2146\" src=\"http:\/\/www.aqbsolutions.com\/wp-content\/uploads\/2018\/08\/image0051-1024x498-800x389.png\" alt=\"\" width=\"800\" height=\"389\" \/><\/p>\n<p>Check the option <strong>Only enable options eligible for RDS Free Usage Tier.<\/strong><\/p>\n<p>This option allows customers to start working with a managed database service for free, on AWS. You can use the AWS RDS Free tier service to develop new applications, test existing applications or gain hands-on experience with the service. Since we have used this service for a demo purpose, we have used the Free usage Tier service.<\/p>\n<p>The AWS RDS free tier service allows you to use the following resources for free:<\/p>\n<ul>\n<li>750 hours ( every month ) of Amazon RDS Single A-Z db.t2.micro instance usage running MySQL, MariaDB, PostgreSQL, Oracle BYOL, or SQL Server (running SQL Server express edition).<\/li>\n<li>20 GB of general purpose (SSD) DB storage.<\/li>\n<li>20 GB of backup storage for your automated database backups and any user initiated DB snapshots.<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-6114\" src=\"http:\/\/aqbsolutions.com\/blog\/wp-content\/uploads\/2018\/08\/Amazon-RDS-Usage-Components.png\" alt=\"Amazon RDS Usage Components\" width=\"975\" height=\"741\" srcset=\"https:\/\/aqbsolutions.com\/blog\/wp-content\/uploads\/2018\/08\/Amazon-RDS-Usage-Components.png 975w, https:\/\/aqbsolutions.com\/blog\/wp-content\/uploads\/2018\/08\/Amazon-RDS-Usage-Components-300x228.png 300w, https:\/\/aqbsolutions.com\/blog\/wp-content\/uploads\/2018\/08\/Amazon-RDS-Usage-Components-768x584.png 768w, https:\/\/aqbsolutions.com\/blog\/wp-content\/uploads\/2018\/08\/Amazon-RDS-Usage-Components-230x175.png 230w, https:\/\/aqbsolutions.com\/blog\/wp-content\/uploads\/2018\/08\/Amazon-RDS-Usage-Components-350x266.png 350w, https:\/\/aqbsolutions.com\/blog\/wp-content\/uploads\/2018\/08\/Amazon-RDS-Usage-Components-480x365.png 480w\" sizes=\"auto, (max-width: 975px) 100vw, 975px\" \/><\/p>\n<p>This free service is available for 12 months starting with the date on which you create your AWS account.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2147\" src=\"http:\/\/www.aqbsolutions.com\/wp-content\/uploads\/2018\/08\/image0071-1024x501-800x391.png\" alt=\"\" width=\"800\" height=\"391\" \/><\/p>\n<p>Click <strong>Next<\/strong> Button which will take you to the next page in the process of creating a MySQL database using the RDS service.<\/p>\n<p>This page allows you to specify the database details such as <strong>Instance specifications<\/strong> and configure the settings.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2148\" src=\"http:\/\/www.aqbsolutions.com\/wp-content\/uploads\/2018\/08\/image009-1024x498-800x389.png\" alt=\"\" width=\"800\" height=\"389\" \/><\/p>\n<p>In the <strong>settings <\/strong>section, we have used the following credentials for creating the database :<\/p>\n<p>DB instance identifier: rdslambda<br \/>\nMaster username: rdslambda<\/p>\n<p>Master Password: rdslambda123$$<\/p>\n<p><strong>\u00a0<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2149\" src=\"http:\/\/www.aqbsolutions.com\/wp-content\/uploads\/2018\/08\/image011-1024x459-800x359.png\" alt=\"\" width=\"800\" height=\"359\" \/><\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2150\" src=\"http:\/\/www.aqbsolutions.com\/wp-content\/uploads\/2018\/08\/image013-1024x498-800x389.png\" alt=\"\" width=\"800\" height=\"389\" \/><\/p>\n<p>Click<strong> Next <\/strong>Button which will take you to the next page in the process of creating a MySQL database.<\/p>\n<p><strong>\u00a0<\/strong><\/p>\n<p>This page allows you to configure advanced settings for creating a database.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2151\" src=\"http:\/\/www.aqbsolutions.com\/wp-content\/uploads\/2018\/08\/image015-1024x501-800x391.png\" alt=\"\" width=\"800\" height=\"391\" \/><\/p>\n<p>In this page, besides filling in other details, click on <strong>Yes<\/strong> in the <strong>Public Accessibility<\/strong> section.<\/p>\n<p>If you select <strong>No<\/strong>, Amazon RDS will not assign a public IP address to the DB instance. In this case, no EC2 instance or devices outside of the VPC will be able to connect the RDS instance.<\/p>\n<p><strong>\u00a0<\/strong><\/p>\n<p>In this page, in the <strong>Database options<\/strong> section, fill in the details including the <strong>Database name.<\/strong><\/p>\n<p>If the <strong>Database name<\/strong> is not specified, then no initial MySQL database will be created on the DB instance.<\/p>\n<p>In this case, we have specified our Database name to be <strong>rdslambda.<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2152\" src=\"http:\/\/www.aqbsolutions.com\/wp-content\/uploads\/2018\/08\/image017-1024x463-800x362.png\" alt=\"\" width=\"800\" height=\"362\" \/><\/p>\n<p>In the <strong>Log exports<\/strong> <strong>section, <\/strong>select all the log types that you need to publish to the Amazon Cloudwatch Logs. In this case, we have we have not selected any one of the log types.<\/p>\n<p><strong>\u00a0<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2153\" src=\"http:\/\/www.aqbsolutions.com\/wp-content\/uploads\/2018\/08\/image019-1024x463-800x362.png\" alt=\"\" width=\"800\" height=\"362\" \/><\/strong><\/p>\n<p>Finally, click on <strong>the Create Database <\/strong>button to create a database<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2154\" src=\"http:\/\/www.aqbsolutions.com\/wp-content\/uploads\/2018\/08\/image021-1024x463-800x362.png\" alt=\"\" width=\"800\" height=\"362\" \/><\/p>\n<p>Once the instance is created, you can check the details of the instance from the <strong>Instances<\/strong> section in the dashboard. Besides other details, you can also check the <strong>endpoint<\/strong> of the instance that is created.T he <strong>Endpoint <\/strong>enables you to connect to the RDS instance from various sources including an AWS Lambda function, as illustrated in this case.<\/p>\n<p>The endpoint generated for the instance that we created is :<\/p>\n<p><strong>rdslambda.clcjqqx9lzkn.us-east-1.rds.amazonaws.com<\/strong><\/p>\n<p><strong>\u00a0<\/strong><\/p>\n<p>The port no of our instance is <strong>3306<\/strong><\/p>\n<p><strong><em>You need both, the endpoint and the port no, to connect to the AWS RDS instance.<\/em><\/strong><\/p>\n<p><strong><em>\u00a0<\/em><\/strong><\/p>\n<p>In the security group section, you can also change the inbound and outbound rules of the instance created.<\/p>\n<p>In this case, we have edited the inbound rules by changing the <strong>Source<\/strong> values to <strong>anywhere<\/strong>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2155\" src=\"http:\/\/www.aqbsolutions.com\/wp-content\/uploads\/2018\/08\/image023-1024x463-800x362.png\" alt=\"\" width=\"800\" height=\"362\" \/><\/p>\n<p>Once you have created the RDS instance, you can test your connection in multiple ways. One way is to connect using your MySQL workbench as shown below.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2156\" src=\"http:\/\/www.aqbsolutions.com\/wp-content\/uploads\/2018\/08\/image025-1024x575-712x400.png\" alt=\"\" width=\"712\" height=\"400\" \/><\/p>\n<p><strong><em>Using the Mysql workbench you can now create your table in which you want to save data from the lambda function.<\/em><\/strong><\/p>\n<p><strong><em>\u00a0<\/em><\/strong><\/p>\n<p><strong>Step2: Write code in Python to save data in the above table<\/strong><\/p>\n<p><strong>\u00a0<\/strong><\/p>\n<p>In this use case, we have written the Lambda code in Python.<br \/>\nHowever, before writing the code you would need to execute the following steps to ensure that your Lambda function is able to connect to the MySQL database of the RDS instance that you have created.<\/p>\n<ul>\n<li><strong>Install PyMysql<\/strong><br \/>\nYou must install any one of the following packages in the virtual environment to access MySQl database using Python<br \/>\nMySQL-python<br \/>\nmysql-connector-python<br \/>\nPyMySQL.In this use case, we have installed PyMySQL to connect to the MySQL database of the RDS instance.<\/li>\n<\/ul>\n<p>You can install PyMySQL on your local machine by executing the following ubuntu command :<\/p>\n<p>[sourcecode language=&#8221;plain&#8221;]sudo apt-get install python3-pymysql [\/sourcecode]<\/p>\n<ul>\n<li><strong>Zip the code and installed contents in a directory and upload it for the lambda function<\/strong><\/li>\n<li>After installation, the PyMySQL contents gets saved in the <strong>\/usr\/lib\/python3\/dist-packages<\/strong> directory in the <strong>pymyql<\/strong> folder.You can now zip your python code for the Lambda function, and the installed contents lying in <strong>the pymysql folder<\/strong> and upload it in your AWS Lambda function as shown below.<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2157\" src=\"http:\/\/www.aqbsolutions.com\/wp-content\/uploads\/2018\/08\/image027-1024x501-800x391.png\" alt=\"\" width=\"800\" height=\"391\" \/><\/p>\n<p>The AWS Lambda function:<\/p>\n<p>The first part of the code calls an external API to retrieve the weather information of Washington. The second part of the code connects to the MySQl database of the RDS instance and saves the weather information in the database.<\/p>\n<p><strong>the code in Python :<\/strong><\/p>\n<p>[sourcecode language=&#8221;plain&#8221;]#import libraries here<\/p>\n<p>import pymysql<\/p>\n<p>import sys<\/p>\n<p>import logging<\/p>\n<p>from botocore.vendored import requests<\/p>\n<p>from datetime import datetime<\/p>\n<p>REGION = &#8216;us-west-2&#8217;<\/p>\n<p>#connect to the rds instance using the details below<\/p>\n<p>rds_host = &#8220;rdslambda.clcjqqx9lzkn.us-east-1.rds.amazonaws.com&#8221;<\/p>\n<p>name = &#8220;rdslambda&#8221;<\/p>\n<p>password = &#8220;rdslambda123$$&#8221;<\/p>\n<p>db_name = &#8220;rdslambda&#8221;<\/p>\n<p>logger= logging.getLogger()<\/p>\n<p>logger.setLevel(logging.DEBUG)<\/p>\n<p>def save_events(event):<\/p>\n<p># Get the current date and time in yy&#8211;mm-dd hours:minutes:second format<\/p>\n<p>now = datetime.now()<\/p>\n<p>now_str = now.strftime(&#8216;%Y-%m-%d %H:%M:%S&#8217;)<\/p>\n<p># API call<\/p>\n<p>response = requests.get(&#8216;http:\/\/api.openweathermap.org\/data\/2.5\/forecast?q=Washington,us&amp;APPID=53d6430c1eccacb54e827045d1aee3d3&#8217;)<\/p>\n<p># Check if the request completed successfully.<\/p>\n<p>if response.status_code == 200:<\/p>\n<p># Convert response data to python dictionary object<\/p>\n<p>datadictionary = response.json()<\/p>\n<p># Return the desired weather information for today from the dictionary object<\/p>\n<p>for data in datadictionary[&#8216;list&#8217;]:<\/p>\n<p>if data[&#8216;dt_txt&#8217;] &gt; now_str:<\/p>\n<p># Return data and print data<\/p>\n<p>description = data[&#8216;weather&#8217;][0][&#8216;description&#8217;]<\/p>\n<p>humidity = data[&#8216;main&#8217;][&#8216;humidity&#8217;]<\/p>\n<p>sea_level = data[&#8216;main&#8217;][&#8216;sea_level&#8217;]<\/p>\n<p>temp = data[&#8216;main&#8217;][&#8216;temp&#8217;]<\/p>\n<p>#print(&#8220;weather:{}, humidity: {}, sea_level: {},temperature:{}&#8221;.format(description,humidity,sea_level,temp))<\/p>\n<p>#return &#8220;weather:{}, humidity: {}, sea_level: {},temperature:{}&#8221;.format(description,humidity,sea_level,temp)<\/p>\n<p>#print(event)<\/p>\n<p>result = []<\/p>\n<p># Using a try catch block to catch exceptions<\/p>\n<p>try:<\/p>\n<p># Define the connection string<\/p>\n<p>conn = pymysql.connect(rds_host, user=name, passwd=password, db=db_name, connect_timeout=5)<\/p>\n<p>except:<\/p>\n<p>logger.error(&#8220;EEEEEE&#8221;)<\/p>\n<p>sys.exit()<\/p>\n<p>with conn.cursor() as cur:<\/p>\n<p>#Insert weather information of Washington in the rdslambda table<\/p>\n<p>query = &#8220;INSERT INTO rdslambda(reg_date,weather,humidity,sea_level,temperature) VALUES (sysdate(),%s,%s,%s,%s)&#8221;<\/p>\n<p>data = (description,humidity,sea_level,temp)<\/p>\n<p>cur.execute(query,data)<\/p>\n<p>conn.commit()<\/p>\n<p>#Retrieve records from the table rdslambda<\/p>\n<p>cur.execute(&#8220;&#8221;&#8221;select * from rdslambda&#8221;&#8221;&#8221;)<\/p>\n<p>#Commit the transaction<\/p>\n<p>conn.commit()<\/p>\n<p>cur.close()<\/p>\n<p>#Print all rows from the rdslambda table<\/p>\n<p>for a row incur:<\/p>\n<p>result.append(list(row))<\/p>\n<p>print (result)<\/p>\n<p>#handler<\/p>\n<p>def main(event, context):<\/p>\n<p>save_events(event)[\/sourcecode]<\/p>\n<p><strong>\u00a0<\/strong><\/p>\n<p><strong>\u00a0<\/strong><\/p>\n<p><strong>Step 3: Test the lambda function and check the logs<\/strong><\/p>\n<p>Once done with the code, you can test the Lambda function by clicking on the <strong>Test<\/strong> button.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2158\" src=\"http:\/\/www.aqbsolutions.com\/wp-content\/uploads\/2018\/08\/image029-1024x463-800x362.png\" alt=\"\" width=\"800\" height=\"362\" \/><\/p>\n<p>You can also check the logs of the lambda function to check if the execution was a success or it contained errors.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-2159\" src=\"http:\/\/www.aqbsolutions.com\/wp-content\/uploads\/2018\/08\/image031-1024x501-800x391.png\" alt=\"\" width=\"800\" height=\"391\" \/><\/p>\n<p><strong>Step 4: Check if the records are inserted in the table by connecting with MYSQL workbench<\/strong><\/p>\n<p>You can now use the MySQL workbench to check whether the records are inserted in the rdslambda table or not.<\/p>\n<p>Hope this article has been useful for you and helped you in understanding how an AWS Lambda function can be used to connect with an AWS RDS instance and save data in the database.<\/p>\n<p>Keep watching this section for more useful articles on AWS.<\/p>\n<p>References :<\/p>\n<p><a href=\"https:\/\/www.youtube.com\/watch?v=-CoL5oN1RzQ&amp;vl=en\">https:\/\/www.youtube.com\/watch?v=-CoL5oN1RzQ&amp;vl=en<\/a><\/p>\n<p><a href=\"https:\/\/jee-appy.blogspot.com\/2018\/02\/aws-lambda-function-with-rds-mysql.html\">https:\/\/jee-appy.blogspot.com\/2018\/02\/aws-lambda-function-with-rds-mysql.html<\/a><\/p>\n<p><a href=\"https:\/\/www.a2hosting.in\/kb\/developer-corner\/mysql\/connecting-to-mysql-using-python\">https:\/\/www.a2hosting.in\/kb\/developer-corner\/mysql\/connecting-to-mysql-using-python<\/a><\/p>\n<p><a href=\"https:\/\/stackoverflow.com\/questions\/33446347\/no-module-named-pymysql\">https:\/\/stackoverflow.com\/questions\/33446347\/no-module-named-pymysql<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you want a small service that accesses database and performs certain operations such as returning data, you can use an AWS [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":6112,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-1864","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-web-services"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Save Data With AWS RDS Database By Using Lambda | aQb<\/title>\n<meta name=\"description\" content=\"The blog speaks about saving data in RDS of Amazon Web Services using Lambda.To know more about aws services and solutions ,visit us.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/aqbsolutions.com\/blog\/2018\/08\/27\/save-data-in-an-aws-rds-database-using-aws-lambda\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Save Data With AWS RDS Database By Using Lambda | aQb\" \/>\n<meta property=\"og:description\" content=\"The blog speaks about saving data in RDS of Amazon Web Services using Lambda.To know more about aws services and solutions ,visit us.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/aqbsolutions.com\/blog\/2018\/08\/27\/save-data-in-an-aws-rds-database-using-aws-lambda\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog\" \/>\n<meta property=\"article:published_time\" content=\"2018-08-27T07:02:10+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-04-18T04:52:04+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/aqbsolutions.com\/blog\/wp-content\/uploads\/2018\/08\/How-do-you-save-data-to-AWS-RDS-via-AWS-Lambda.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"780\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"aQbSolutions\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"aQbSolutions\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/aqbsolutions.com\/blog\/2018\/08\/27\/save-data-in-an-aws-rds-database-using-aws-lambda\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/aqbsolutions.com\/blog\/2018\/08\/27\/save-data-in-an-aws-rds-database-using-aws-lambda\/\"},\"author\":{\"name\":\"aQbSolutions\",\"@id\":\"https:\/\/aqbsolutions.com\/blog\/#\/schema\/person\/7f8c6dcba99e9b5a7c24a525f8365952\"},\"headline\":\"Save data in an AWS RDS Database using AWS Lambda\",\"datePublished\":\"2018-08-27T07:02:10+00:00\",\"dateModified\":\"2025-04-18T04:52:04+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/aqbsolutions.com\/blog\/2018\/08\/27\/save-data-in-an-aws-rds-database-using-aws-lambda\/\"},\"wordCount\":1446,\"image\":{\"@id\":\"https:\/\/aqbsolutions.com\/blog\/2018\/08\/27\/save-data-in-an-aws-rds-database-using-aws-lambda\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/aqbsolutions.com\/blog\/wp-content\/uploads\/2018\/08\/How-do-you-save-data-to-AWS-RDS-via-AWS-Lambda.png\",\"articleSection\":[\"Web Services\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/aqbsolutions.com\/blog\/2018\/08\/27\/save-data-in-an-aws-rds-database-using-aws-lambda\/\",\"url\":\"https:\/\/aqbsolutions.com\/blog\/2018\/08\/27\/save-data-in-an-aws-rds-database-using-aws-lambda\/\",\"name\":\"Save Data With AWS RDS Database By Using Lambda | aQb\",\"isPartOf\":{\"@id\":\"https:\/\/aqbsolutions.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/aqbsolutions.com\/blog\/2018\/08\/27\/save-data-in-an-aws-rds-database-using-aws-lambda\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/aqbsolutions.com\/blog\/2018\/08\/27\/save-data-in-an-aws-rds-database-using-aws-lambda\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/aqbsolutions.com\/blog\/wp-content\/uploads\/2018\/08\/How-do-you-save-data-to-AWS-RDS-via-AWS-Lambda.png\",\"datePublished\":\"2018-08-27T07:02:10+00:00\",\"dateModified\":\"2025-04-18T04:52:04+00:00\",\"author\":{\"@id\":\"https:\/\/aqbsolutions.com\/blog\/#\/schema\/person\/7f8c6dcba99e9b5a7c24a525f8365952\"},\"description\":\"The blog speaks about saving data in RDS of Amazon Web Services using Lambda.To know more about aws services and solutions ,visit us.\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/aqbsolutions.com\/blog\/2018\/08\/27\/save-data-in-an-aws-rds-database-using-aws-lambda\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/aqbsolutions.com\/blog\/2018\/08\/27\/save-data-in-an-aws-rds-database-using-aws-lambda\/#primaryimage\",\"url\":\"https:\/\/aqbsolutions.com\/blog\/wp-content\/uploads\/2018\/08\/How-do-you-save-data-to-AWS-RDS-via-AWS-Lambda.png\",\"contentUrl\":\"https:\/\/aqbsolutions.com\/blog\/wp-content\/uploads\/2018\/08\/How-do-you-save-data-to-AWS-RDS-via-AWS-Lambda.png\",\"width\":1200,\"height\":780},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/aqbsolutions.com\/blog\/#website\",\"url\":\"https:\/\/aqbsolutions.com\/blog\/\",\"name\":\"Aqbsolutions Blog\",\"description\":\"Blogs | IT Services in USA and Canada | aQb Solutions\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/aqbsolutions.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/aqbsolutions.com\/blog\/#\/schema\/person\/7f8c6dcba99e9b5a7c24a525f8365952\",\"name\":\"aQbSolutions\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/aqbsolutions.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d37e12c5e93bdf3f02abdb5c8a89bad8841bd4743b3b2ea558914abbb60c7414?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d37e12c5e93bdf3f02abdb5c8a89bad8841bd4743b3b2ea558914abbb60c7414?s=96&d=mm&r=g\",\"caption\":\"aQbSolutions\"},\"url\":\"https:\/\/aqbsolutions.com\/blog\/author\/aqbsolutions\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Save Data With AWS RDS Database By Using Lambda | aQb","description":"The blog speaks about saving data in RDS of Amazon Web Services using Lambda.To know more about aws services and solutions ,visit us.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/aqbsolutions.com\/blog\/2018\/08\/27\/save-data-in-an-aws-rds-database-using-aws-lambda\/","og_locale":"en_US","og_type":"article","og_title":"Save Data With AWS RDS Database By Using Lambda | aQb","og_description":"The blog speaks about saving data in RDS of Amazon Web Services using Lambda.To know more about aws services and solutions ,visit us.","og_url":"https:\/\/aqbsolutions.com\/blog\/2018\/08\/27\/save-data-in-an-aws-rds-database-using-aws-lambda\/","og_site_name":"Blog","article_published_time":"2018-08-27T07:02:10+00:00","article_modified_time":"2025-04-18T04:52:04+00:00","og_image":[{"width":1200,"height":780,"url":"http:\/\/aqbsolutions.com\/blog\/wp-content\/uploads\/2018\/08\/How-do-you-save-data-to-AWS-RDS-via-AWS-Lambda.png","type":"image\/png"}],"author":"aQbSolutions","twitter_card":"summary_large_image","twitter_misc":{"Written by":"aQbSolutions","Est. reading time":"10 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/aqbsolutions.com\/blog\/2018\/08\/27\/save-data-in-an-aws-rds-database-using-aws-lambda\/#article","isPartOf":{"@id":"https:\/\/aqbsolutions.com\/blog\/2018\/08\/27\/save-data-in-an-aws-rds-database-using-aws-lambda\/"},"author":{"name":"aQbSolutions","@id":"https:\/\/aqbsolutions.com\/blog\/#\/schema\/person\/7f8c6dcba99e9b5a7c24a525f8365952"},"headline":"Save data in an AWS RDS Database using AWS Lambda","datePublished":"2018-08-27T07:02:10+00:00","dateModified":"2025-04-18T04:52:04+00:00","mainEntityOfPage":{"@id":"https:\/\/aqbsolutions.com\/blog\/2018\/08\/27\/save-data-in-an-aws-rds-database-using-aws-lambda\/"},"wordCount":1446,"image":{"@id":"https:\/\/aqbsolutions.com\/blog\/2018\/08\/27\/save-data-in-an-aws-rds-database-using-aws-lambda\/#primaryimage"},"thumbnailUrl":"https:\/\/aqbsolutions.com\/blog\/wp-content\/uploads\/2018\/08\/How-do-you-save-data-to-AWS-RDS-via-AWS-Lambda.png","articleSection":["Web Services"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/aqbsolutions.com\/blog\/2018\/08\/27\/save-data-in-an-aws-rds-database-using-aws-lambda\/","url":"https:\/\/aqbsolutions.com\/blog\/2018\/08\/27\/save-data-in-an-aws-rds-database-using-aws-lambda\/","name":"Save Data With AWS RDS Database By Using Lambda | aQb","isPartOf":{"@id":"https:\/\/aqbsolutions.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/aqbsolutions.com\/blog\/2018\/08\/27\/save-data-in-an-aws-rds-database-using-aws-lambda\/#primaryimage"},"image":{"@id":"https:\/\/aqbsolutions.com\/blog\/2018\/08\/27\/save-data-in-an-aws-rds-database-using-aws-lambda\/#primaryimage"},"thumbnailUrl":"https:\/\/aqbsolutions.com\/blog\/wp-content\/uploads\/2018\/08\/How-do-you-save-data-to-AWS-RDS-via-AWS-Lambda.png","datePublished":"2018-08-27T07:02:10+00:00","dateModified":"2025-04-18T04:52:04+00:00","author":{"@id":"https:\/\/aqbsolutions.com\/blog\/#\/schema\/person\/7f8c6dcba99e9b5a7c24a525f8365952"},"description":"The blog speaks about saving data in RDS of Amazon Web Services using Lambda.To know more about aws services and solutions ,visit us.","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/aqbsolutions.com\/blog\/2018\/08\/27\/save-data-in-an-aws-rds-database-using-aws-lambda\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/aqbsolutions.com\/blog\/2018\/08\/27\/save-data-in-an-aws-rds-database-using-aws-lambda\/#primaryimage","url":"https:\/\/aqbsolutions.com\/blog\/wp-content\/uploads\/2018\/08\/How-do-you-save-data-to-AWS-RDS-via-AWS-Lambda.png","contentUrl":"https:\/\/aqbsolutions.com\/blog\/wp-content\/uploads\/2018\/08\/How-do-you-save-data-to-AWS-RDS-via-AWS-Lambda.png","width":1200,"height":780},{"@type":"WebSite","@id":"https:\/\/aqbsolutions.com\/blog\/#website","url":"https:\/\/aqbsolutions.com\/blog\/","name":"Aqbsolutions Blog","description":"Blogs | IT Services in USA and Canada | aQb Solutions","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/aqbsolutions.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/aqbsolutions.com\/blog\/#\/schema\/person\/7f8c6dcba99e9b5a7c24a525f8365952","name":"aQbSolutions","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/aqbsolutions.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d37e12c5e93bdf3f02abdb5c8a89bad8841bd4743b3b2ea558914abbb60c7414?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d37e12c5e93bdf3f02abdb5c8a89bad8841bd4743b3b2ea558914abbb60c7414?s=96&d=mm&r=g","caption":"aQbSolutions"},"url":"https:\/\/aqbsolutions.com\/blog\/author\/aqbsolutions\/"}]}},"_links":{"self":[{"href":"https:\/\/aqbsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/1864","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/aqbsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/aqbsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/aqbsolutions.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/aqbsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=1864"}],"version-history":[{"count":2,"href":"https:\/\/aqbsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/1864\/revisions"}],"predecessor-version":[{"id":6115,"href":"https:\/\/aqbsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/1864\/revisions\/6115"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/aqbsolutions.com\/blog\/wp-json\/wp\/v2\/media\/6112"}],"wp:attachment":[{"href":"https:\/\/aqbsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=1864"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/aqbsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=1864"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/aqbsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=1864"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}