{"id":3763,"date":"2018-07-01T18:15:42","date_gmt":"2018-07-01T18:15:42","guid":{"rendered":"https:\/\/max-drake.cc\/?p=3763"},"modified":"2018-07-01T18:41:24","modified_gmt":"2018-07-01T18:41:24","slug":"aws-dynamodb-with-s3-storage-and-lambda-on-free-tier","status":"publish","type":"post","link":"https:\/\/max-drake.cc\/?p=3763","title":{"rendered":"AWS DynamoDB with S3 storage and Lambda on Free Tier"},"content":{"rendered":"<p>From the last post regarding RapidMiner I saw that it connected to the AWS (Amazon Web Services) S3 storage. On exploring the AWS Free Tier I note that you can have 5GB of Storage for free. I also then noted that they had a Free Tier for DynamoDB which is a NoSQL database. So I thought I would try and set that up. I don&#8217;t think RapidMiner can link to DynamoDB but it interested me.<\/p>\n<p>I thought that setting up the DB would be simple, its not. You have to wire it up so that after creating a table in DynamoDB with a Key field, you then have to upload a Json file to S3 storage and use a Lambda programme function to import the data with IAM (Identity and Access Management) Policy and Role to allow for access to these services (it sort of makes sense, but tortuous).<\/p>\n<p>I followed this video for the setup:<\/p>\n<p><iframe title=\"AWS Lambda : load JSON file from S3 and put in dynamodb\" width=\"678\" height=\"509\" data-src=\"https:\/\/www.youtube.com\/embed\/Y18HF5ALXew?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" data-load-mode=\"1\"><\/iframe><\/p>\n<p><em>NOTE: This process only uploads one row of data at a time.<\/em><\/p>\n<p>So, lets hop to it. I have previously setup a free (for a year) EC2 VPS (virtual private server, for a demo site for OpenMAINT) service&nbsp; so I will not go through the process of showing how to setup an AWS account. I did have to&nbsp; select an S3 service &amp; a DynamoDB instance.<\/p>\n<h2>Process<\/h2>\n<p>Set up&nbsp; IAM (Identity and Access Management) Policy and Role.<\/p>\n<p><img decoding=\"async\" class=\"wp-image-3766 aligncenter lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im01-2-1024x774.jpg\" alt=\"\" width=\"1466\" height=\"1107\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im01-2-1024x774.jpg 1024w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im01-2-300x227.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im01-2-768x580.jpg 768w\" data-sizes=\"(max-width: 1466px) 100vw, 1466px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1466px; --smush-placeholder-aspect-ratio: 1466\/1107;\" \/><\/p>\n<p><img decoding=\"async\" class=\"wp-image-3765 aligncenter lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im02-2-1024x335.jpg\" alt=\"\" width=\"1457\" height=\"477\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im02-2-1024x335.jpg 1024w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im02-2-300x98.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im02-2-768x251.jpg 768w\" data-sizes=\"(max-width: 1457px) 100vw, 1457px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1457px; --smush-placeholder-aspect-ratio: 1457\/477;\" \/><\/p>\n<p>The policy combines all of the services that you are using, in this case Cloudwatch logs (see below), S3 bucket &amp; DynamoDB. From what I can see this is the PERMISSIONS process for being able to access these services.<\/p>\n<p><img decoding=\"async\" class=\"wp-image-3779 aligncenter lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im03-2-1024x578.jpg\" alt=\"\" width=\"1478\" height=\"835\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im03-2-1024x578.jpg 1024w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im03-2-300x169.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im03-2-768x433.jpg 768w\" data-sizes=\"(max-width: 1478px) 100vw, 1478px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1478px; --smush-placeholder-aspect-ratio: 1478\/835;\" \/><\/p>\n<p>Setup a CloudWatch Log. This is required for when you create a TRIGGER in the Lambda function that is activated when a new JSON file is uploaded to a specific S3 bucket.<\/p>\n<p>When the file is uploaded to the Bucket, the TRIGGER is activated, and the Cloudwatch Log shows what happens. So a DEBUG tool for the process to see that it works.<\/p>\n<p>It is used in this example to 1\/ See what the &#8220;RECORD&#8221; of the process looks like so that you can find the objects (as per the video) so that you have the right names.<\/p>\n<p><img decoding=\"async\" class=\"wp-image-3778 aligncenter lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im04-2-1024x480.jpg\" alt=\"\" width=\"1452\" height=\"681\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im04-2-1024x480.jpg 1024w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im04-2-300x141.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im04-2-768x360.jpg 768w\" data-sizes=\"(max-width: 1452px) 100vw, 1452px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1452px; --smush-placeholder-aspect-ratio: 1452\/681;\" \/><\/p>\n<p><img decoding=\"async\" class=\"wp-image-3777 aligncenter lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im05-1-1024x457.jpg\" alt=\"\" width=\"1528\" height=\"683\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im05-1-1024x457.jpg 1024w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im05-1-300x134.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im05-1-768x343.jpg 768w\" data-sizes=\"(max-width: 1528px) 100vw, 1528px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1528px; --smush-placeholder-aspect-ratio: 1528\/683;\" \/><\/p>\n<p><img decoding=\"async\" class=\"wp-image-3776 aligncenter lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im06-1-1024x585.jpg\" alt=\"\" width=\"1458\" height=\"832\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im06-1-1024x585.jpg 1024w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im06-1-300x171.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im06-1-768x438.jpg 768w\" data-sizes=\"(max-width: 1458px) 100vw, 1458px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1458px; --smush-placeholder-aspect-ratio: 1458\/832;\" \/><\/p>\n<p>On the S3 I didn&#8217;t initially give All resources permissions but I later went back and modified this so it wall (all permissions)- (it didn&#8217;t seem to make any difference)<\/p>\n<p><img decoding=\"async\" class=\"wp-image-3775 aligncenter lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im07-1-1024x584.jpg\" alt=\"\" width=\"1496\" height=\"854\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im07-1-1024x584.jpg 1024w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im07-1-300x171.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im07-1-768x438.jpg 768w\" data-sizes=\"(max-width: 1496px) 100vw, 1496px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1496px; --smush-placeholder-aspect-ratio: 1496\/854;\" \/><\/p>\n<p>Screenshots missing for DynamoDB but same process as per S3 setup<\/p>\n<p><img decoding=\"async\" class=\"wp-image-3774 aligncenter lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im08-1-1024x602.jpg\" alt=\"\" width=\"1461\" height=\"860\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im08-1-1024x602.jpg 1024w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im08-1-300x176.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im08-1-768x451.jpg 768w\" data-sizes=\"(max-width: 1461px) 100vw, 1461px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1461px; --smush-placeholder-aspect-ratio: 1461\/860;\" \/><\/p>\n<p>Then press create policy and the next screen confirms it has been created.<\/p>\n<p><img decoding=\"async\" class=\"wp-image-3773 aligncenter lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im09-1-1024x453.jpg\" alt=\"\" width=\"1478\" height=\"654\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im09-1-1024x453.jpg 1024w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im09-1-300x133.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im09-1-768x339.jpg 768w\" data-sizes=\"(max-width: 1478px) 100vw, 1478px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1478px; --smush-placeholder-aspect-ratio: 1478\/654;\" \/><\/p>\n<p>Then you need to setup Roles for the Policy that has just been created.<\/p>\n<p><img decoding=\"async\" class=\"wp-image-3772 aligncenter lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im10-1-1024x404.jpg\" alt=\"\" width=\"1486\" height=\"585\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im10-1-1024x404.jpg 1024w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im10-1-300x118.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im10-1-768x303.jpg 768w\" data-sizes=\"(max-width: 1486px) 100vw, 1486px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1486px; --smush-placeholder-aspect-ratio: 1486\/585;\" \/><img decoding=\"async\" class=\"wp-image-3771 aligncenter lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im11a-1024x719.jpg\" alt=\"\" width=\"1496\" height=\"1050\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im11a-1024x719.jpg 1024w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im11a-300x211.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im11a-768x539.jpg 768w\" data-sizes=\"(max-width: 1496px) 100vw, 1496px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1496px; --smush-placeholder-aspect-ratio: 1496\/1050;\" \/><\/p>\n<p><img decoding=\"async\" class=\"wp-image-3770 aligncenter lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im12-1-1024x778.jpg\" alt=\"\" width=\"1482\" height=\"1126\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im12-1-1024x778.jpg 1024w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im12-1-300x228.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im12-1-768x583.jpg 768w\" data-sizes=\"(max-width: 1482px) 100vw, 1482px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1482px; --smush-placeholder-aspect-ratio: 1482\/1126;\" \/><\/p>\n<p><img decoding=\"async\" class=\"wp-image-3769 aligncenter lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im13-1-1024x315.jpg\" alt=\"\" width=\"1489\" height=\"459\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im13-1-1024x315.jpg 1024w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im13-1-300x92.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im13-1-768x237.jpg 768w\" data-sizes=\"(max-width: 1489px) 100vw, 1489px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1489px; --smush-placeholder-aspect-ratio: 1489\/459;\" \/><\/p>\n<p>Then the actual programming bit with the Lambda Function.<\/p>\n<p><img decoding=\"async\" class=\"wp-image-3768 aligncenter lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im14-1-1024x775.jpg\" alt=\"\" width=\"1550\" height=\"1173\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im14-1-1024x775.jpg 1024w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im14-1-300x227.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im14-1-768x581.jpg 768w\" data-sizes=\"(max-width: 1550px) 100vw, 1550px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1550px; --smush-placeholder-aspect-ratio: 1550\/1173;\" \/><\/p>\n<p>&nbsp; <img decoding=\"async\" class=\"wp-image-3767 aligncenter lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im15-1-1024x686.jpg\" alt=\"\" width=\"1481\" height=\"992\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im15-1-1024x686.jpg 1024w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im15-1-300x201.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im15-1-768x515.jpg 768w\" data-sizes=\"(max-width: 1481px) 100vw, 1481px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1481px; --smush-placeholder-aspect-ratio: 1481\/992;\" \/>&nbsp;<\/p>\n<p>I am going with the Python 3.6 version as that is what is loaded on my machine (also following the video, rather than the older 2.7 version of python)<img decoding=\"async\" class=\"wp-image-3784 aligncenter lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im16-1-1024x461.jpg\" alt=\"\" width=\"1494\" height=\"672\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im16-1-1024x461.jpg 1024w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im16-1-300x135.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im16-1-768x346.jpg 768w\" data-sizes=\"(max-width: 1494px) 100vw, 1494px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1494px; --smush-placeholder-aspect-ratio: 1494\/672;\" \/> <img decoding=\"async\" class=\"alignnone wp-image-3783 lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im16a-1024x440.jpg\" alt=\"\" width=\"1526\" height=\"655\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im16a-1024x440.jpg 1024w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im16a-300x129.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im16a-768x330.jpg 768w\" data-sizes=\"(max-width: 1526px) 100vw, 1526px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1526px; --smush-placeholder-aspect-ratio: 1526\/655;\" \/><\/p>\n<p>So the environment is setup ready to go<img decoding=\"async\" class=\"wp-image-3782 aligncenter lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im17-1-1024x584.jpg\" alt=\"\" width=\"1468\" height=\"838\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im17-1-1024x584.jpg 1024w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im17-1-300x171.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/06\/im17-1-768x438.jpg 768w\" data-sizes=\"(max-width: 1468px) 100vw, 1468px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1468px; --smush-placeholder-aspect-ratio: 1468\/838;\" \/><\/p>\n<h3>DynamoDB Table<\/h3>\n<p>In services , go to DynamoDB and press Create Table.<\/p>\n<p>Fill in Table Name &amp; Primary Key Name ( in this case I have ID number that is unique), make sure you have correct&nbsp; Data Type (number, string etc for the primary key) Then create the table (button bottom right)<\/p>\n<p><img decoding=\"async\" class=\"wp-image-3800 aligncenter lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im19-1024x455.jpg\" alt=\"\" width=\"1480\" height=\"657\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im19-1024x455.jpg 1024w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im19-300x133.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im19-768x341.jpg 768w\" data-sizes=\"(max-width: 1480px) 100vw, 1480px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1480px; --smush-placeholder-aspect-ratio: 1480\/657;\" \/><\/p>\n<p>Going to the Tables on the left sidebar shows you tables that you have created. Here, if you click on the &#8220;Prop&#8221; table you will see, under the Items tab, ID (pk)&#8221; field. The only one created.<\/p>\n<p><img decoding=\"async\" class=\"wp-image-3799 aligncenter lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im20-1024x291.jpg\" alt=\"\" width=\"1426\" height=\"406\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im20-1024x291.jpg 1024w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im20-300x85.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im20-768x218.jpg 768w\" data-sizes=\"(max-width: 1426px) 100vw, 1426px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1426px; --smush-placeholder-aspect-ratio: 1426\/406;\" \/><\/p>\n<h3>Lambda Trigger<\/h3>\n<p>Next we make the Trigger in the Lambda Function tab that we have open.<\/p>\n<p>In the middle of the screen is a dotted box with &#8221; Add triggers&#8230;..&#8221; Click on S3 in lefty column (as we want to activate a trigger when we upload a JSON file into our S3 storage)<\/p>\n<p><img decoding=\"async\" class=\"wp-image-3798 aligncenter lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im21-1024x578.jpg\" alt=\"\" width=\"1503\" height=\"849\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im21-1024x578.jpg 1024w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im21-300x169.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im21-768x434.jpg 768w\" data-sizes=\"(max-width: 1503px) 100vw, 1503px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1503px; --smush-placeholder-aspect-ratio: 1503\/849;\" \/><\/p>\n<p>A box appears asking for configuration in the bottom of the screen. Fill it in<\/p>\n<p><img decoding=\"async\" class=\"wp-image-3797 aligncenter lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im22-1024x678.jpg\" alt=\"\" width=\"1490\" height=\"987\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im22-1024x678.jpg 1024w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im22-300x199.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im22-768x509.jpg 768w\" data-sizes=\"(max-width: 1490px) 100vw, 1490px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1490px; --smush-placeholder-aspect-ratio: 1490\/987;\" \/><\/p>\n<p>The Event is an object is created (uploaded) type .json. Afteradding the conbfiguration you need to save the trigger.<\/p>\n<p><img decoding=\"async\" class=\"wp-image-3796 aligncenter lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im23-1024x519.jpg\" alt=\"\" width=\"1462\" height=\"742\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im23-1024x519.jpg 1024w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im23-300x152.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im23-768x390.jpg 768w\" data-sizes=\"(max-width: 1462px) 100vw, 1462px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1462px; --smush-placeholder-aspect-ratio: 1462\/742;\" \/><\/p>\n<h3>Creating JSON file from CSV file<\/h3>\n<p>I have some CSV data and to convert it to JSON I use the online CSV to JSON converter. I took the top header and first line of data for the test file.<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-3789 lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im30-1024x421.jpg\" alt=\"\" width=\"1492\" height=\"614\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im30-1024x421.jpg 1024w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im30-300x123.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im30-768x316.jpg 768w\" data-sizes=\"(max-width: 1492px) 100vw, 1492px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1492px; --smush-placeholder-aspect-ratio: 1492\/614;\" \/><\/p>\n<h3>Amason S3 &#8211; upload .json file<\/h3>\n<p>Going into the S3 instance, I uploaded the json file (to check whether the TRIGGER was activated.<\/p>\n<p><img decoding=\"async\" class=\"wp-image-3795 aligncenter lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im24-1024x464.jpg\" alt=\"\" width=\"1458\" height=\"660\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im24-1024x464.jpg 1024w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im24-300x136.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im24-768x348.jpg 768w\" data-sizes=\"(max-width: 1458px) 100vw, 1458px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1458px; --smush-placeholder-aspect-ratio: 1458\/660;\" \/><\/p>\n<p><img decoding=\"async\" class=\"wp-image-3794 aligncenter lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im25-1024x594.jpg\" alt=\"\" width=\"1489\" height=\"863\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im25-1024x594.jpg 1024w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im25-300x174.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im25-768x446.jpg 768w\" data-sizes=\"(max-width: 1489px) 100vw, 1489px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1489px; --smush-placeholder-aspect-ratio: 1489\/863;\" \/><\/p>\n<h3>CloudWatch LOG<\/h3>\n<p>Going next to the cloudwatch service,&nbsp; click on Logs&nbsp; and the logs group instance<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-3793 lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im26-1024x283.jpg\" alt=\"\" width=\"1465\" height=\"404\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im26-1024x283.jpg 1024w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im26-300x83.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im26-768x212.jpg 768w\" data-sizes=\"(max-width: 1465px) 100vw, 1465px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1465px; --smush-placeholder-aspect-ratio: 1465\/404;\" \/><\/p>\n<p>Opening it out shows the Lambda function process. In this case, we are calling the information from the uploaded file, so we can see what has been called.<\/p>\n<p>This is the python code (note indent for print function):<\/p>\n<p>import boto3<br \/>\ndef lambda_handler(event, context):<br \/>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print(str(event))<br \/>\nreturn &#8216;Hello from Lambda&#8217;<\/p>\n<p>The print(str(event)) shows, in the cloudwatch log the Record of that activity.<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-3792 lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im27-1024x324.jpg\" alt=\"\" width=\"1529\" height=\"485\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im27-1024x324.jpg 1024w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im27-300x95.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im27-768x243.jpg 768w\" data-sizes=\"(max-width: 1529px) 100vw, 1529px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1529px; --smush-placeholder-aspect-ratio: 1529\/485;\" \/><\/p>\n<p>If you cut\/paste this to an ONLINE JSON VIEWER, and after pasting, Format it (with Format button), it will show you the JSON output.<\/p>\n<p><img decoding=\"async\" class=\"wp-image-3791 aligncenter lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im28-1024x363.jpg\" alt=\"\" width=\"1511\" height=\"535\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im28-1024x363.jpg 1024w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im28-300x106.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im28-768x272.jpg 768w\" data-sizes=\"(max-width: 1511px) 100vw, 1511px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1511px; --smush-placeholder-aspect-ratio: 1511\/535;\" \/><\/p>\n<p>If you then go into the VIEWER tab, it will show you the structure of the Data.<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-3790 lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im29-1024x392.jpg\" alt=\"\" width=\"1510\" height=\"579\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im29-1024x392.jpg 1024w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im29-300x115.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im29-768x294.jpg 768w\" data-sizes=\"(max-width: 1510px) 100vw, 1510px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1510px; --smush-placeholder-aspect-ratio: 1510\/579;\" \/><\/p>\n<p>This can be used to find the objects that you are looking for (watch the video as it goes through it very well).<\/p>\n<p>From this we can programmatically find the s3 &#8220;Bucket Name&#8221; and the s3 File &#8220;Name&#8221; by seeing what is called in the record.<\/p>\n<p>bucket = <strong>event<\/strong>[&#8216;Records&#8217;][0][&#8216;s3&#8217;][&#8216;bucket&#8217;][&#8216;name&#8217;]\njson_file_name = <strong>event<\/strong>[&#8216;Records&#8217;][0][&#8216;s3&#8217;][&#8216;object&#8217;][&#8216;key&#8217;]\n<p>So without knowing either of these items, we get them from the ACTIVATED TRIGGER. So they are used to build up the CODE (note indents for Python code) :<\/p>\n<p>import boto3<br \/>\nimport json<br \/>\ns3_client = boto3.client(&#8216;s3&#8217;)<br \/>\ndynamodb=boto3.resource(&#8216;dynamodb&#8217;)<br \/>\ndef lambda_handler(event, context):<br \/>\n&nbsp;&nbsp; bucket = event[&#8216;Records&#8217;][0][&#8216;s3&#8217;][&#8216;bucket&#8217;][&#8216;name&#8217;]\n&nbsp;&nbsp; keyz = event[&#8216;Records&#8217;][0][&#8216;s3&#8217;][&#8216;object&#8217;][&#8216;key&#8217;]\n&nbsp;&nbsp; json_object = s3_client.get_object(Bucket=bucket,Key=keyz)<br \/>\n&nbsp;&nbsp; jsonFileReader = json_object[&#8216;Body&#8217;].read()<br \/>\n&nbsp;&nbsp; jsonDict=json.loads(jsonFileReader)<br \/>\n&nbsp;&nbsp; table= dynamodb.Table(&#8216;Prop1&#8217;)<br \/>\n&nbsp;&nbsp; table.put_item(Item=jsonDict)<\/p>\n<p>There is one part of the code where the data has to be changed to a Python Dictionary so that it can be inserted into the Dynamo Table.<\/p>\n<h3>Result<\/h3>\n<p>Hurray, one line of data (shortened) into database. This took a lot of de-bugging, see below.<\/p>\n<h3><img decoding=\"async\" class=\"wp-image-3804 aligncenter lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im31-1024x335.jpg\" alt=\"\" width=\"1658\" height=\"543\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im31-1024x335.jpg 1024w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im31-300x98.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im31-768x251.jpg 768w\" data-sizes=\"(max-width: 1658px) 100vw, 1658px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1658px; --smush-placeholder-aspect-ratio: 1658\/543;\" \/><\/h3>\n<h3>Debugging<\/h3>\n<p>I should have know that this wasn&#8217;t going to be easy. This article &#8220;<a href=\"https:\/\/optimalbi.com\/blog\/2017\/03\/15\/dynamodb-vs-mongodb-battle-of-the-nosql-databases\/\" target=\"_blank\" rel=\"noopener\">DynamoDB vs MongoDB: Battle of the NoSQL Databases<\/a>&#8221; discussed the difficulties about getting DynamoDB up and running too.<\/p>\n<p>I stuffed this up on a number of levels in the process.<\/p>\n<p>I ended up, in my IAM policy having 2 instances of S3. So that caused a glitch and lots of errors. And took a long long time to debug. Hard to know that this was an issue, just had to go back and re-do strps until it finally fixed itself &amp; then realised about the 2 instances in the IAM policy.<\/p>\n<p>JSON format. If you look in the video, in his dataset he has DOUBLE QUOTES (&#8220;) around all the items (apart from numbers (no quotes). DynamoDB wants double quotes, single ones wont do, so I had to use search\/replace in Notepad++ to change these.<\/p>\n<p>A few issues with indent in Python. I had forgot about that, so a lot of uploads of the file in S3 to retest it and use the cloudwatch log.<\/p>\n<p>Overall about a day debugging 12 lines of code that looked so simple and elegant in the video.<\/p>\n<p>The cloudwatch log wasn&#8217;t that great at pointing to where the problem was (apart from the Double quotes in the Json file). At least it did tell you that there was a glitch though ( nothing more frustrating than code run then nothing, bloody hard to debug).<\/p>\n<p>I ended up going back to printing out bucket &amp; Key to see that these were reading correctly. Early on in the debug process I did have an issue with it not reading the Key correctly.<\/p>\n<p>Another issue, when trying to upload lots of rows of data , was it timing out. You need to be in Lambda console and click on wheel to find the timeout setting (set at 3 seconds) and I altered to a longer duration.<\/p>\n<p><img decoding=\"async\" class=\"wp-image-3807 aligncenter lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im32-1024x589.jpg\" alt=\"\" width=\"1551\" height=\"892\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im32-1024x589.jpg 1024w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im32-300x173.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im32-768x442.jpg 768w\" data-sizes=\"(max-width: 1551px) 100vw, 1551px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1551px; --smush-placeholder-aspect-ratio: 1551\/892;\" \/><\/p>\n<p>Another thing is empty cells! If there are any in the JSON file then they will not load. This is part of NoSQL that requires non-null data fields. So this is a bit of a challenge for uploading data from a CSV file where there are empty cells. They have to be cleaned out so the file can be uploaded into DynamoDB.<\/p>\n<p>I have just ascertained that this process is for uploading one Row at a time. I think this may be the python dictionary setup being used. So not a fast way to populate a database from scratch. I will need to do some more research on how to upload multiple lines of data into DynamoDB.<\/p>\n<p>Lessons learned:<\/p>\n<ul>\n<li>Not easy, quite a complex process to populate a database, I have now got to figure out how to do multiple line loads.<\/li>\n<li>Good to see that the S3 storage is free<\/li>\n<li>I like the Lambda Function python process, I think I&#8217;ll need to explore this more.<\/li>\n<li>Overall not a particularly successful process to date, but some learning of some of the AWS services and how they connect to each other.<\/li>\n<li>I think I would setup a KNIME or RapidMiner process to setup the JSON files with no blanks and ordered so that they upload well.<\/li>\n<\/ul>\n<p>Where to from here? I would like to explore connecting to S3 externally (with RapidMiner) and also connecting to DynamoDB for some other purpose. A bit more research required for the latter.<\/p>\n<p><em>End note: The Featured image is from the video by <a href=\"https:\/\/www.youtube.com\/channel\/UCuFg53ZTr6maqBC-4i9o4-w\" target=\"_blank\" rel=\"noopener\">Java Home Cloud<\/a>. I have used it without their permission but am acknowledging their source.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>From the last post regarding RapidMiner I saw that it connected to the AWS (Amazon Web Services) S3 storage. On exploring the AWS Free Tier I note that you can have 5GB of Storage for free. I also then noted that they had a Free Tier for DynamoDB which is a NoSQL database. So I [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3809,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[41,39,11],"tags":[],"class_list":["post-3763","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-aws-gc-az-free-tier","category-nosql-databases","category-virtual-private-servers"],"featured_image_src":"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im33.jpg","featured_image_src_square":"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/07\/im33.jpg","author_info":{"display_name":"Max Drake","author_link":"https:\/\/max-drake.cc\/?author=1"},"_links":{"self":[{"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/posts\/3763","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3763"}],"version-history":[{"count":0,"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/posts\/3763\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/media\/3809"}],"wp:attachment":[{"href":"https:\/\/max-drake.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3763"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3763"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3763"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}