Skip to content
Advertisement

Load JSON data from CloudTrail into DynamoDB using Boto

I am working on a Boto3 script that can load the attributes from Cloudtrail into Dynamodb. The format of my cloudtrail logs is JSON. I am fairly new to DynamoDB and I am not sure where I am making a mistake. I’m trying to store “S3BucketName” as well as the name of the bucket which is “goodbucket3”. Name for the cloudtrail is “GoodTrail”.This is what I have come up with so far. I am getting this error “ResourceNotFoundException: An error occurred (ResourceNotFoundException) when calling the PutItem operation: Requested resource not found”

JavaScript

Advertisement

Answer

Your table is just a dictionary. It is not dynamodb’s table object.

To rectify the issue:

JavaScript

Based on your definition, you don’t have any id. Your primary key in your table is S3BucketName, not id.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement