- Newest
- Most votes
- Most comments
You can access the data in your SageMaker Notebook by reading it using the boto3 client. Initialize a DynamoDB Client and do a Scan
which will return all the data that you require.
Note that this will be in JSON format and you would need to convert that to a format which is useful for the rest of your notebook, such as converting to a pandas dataframe.
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/dynamodb.html
Hey so in short, that is correct and you will have to export your DynamoDB table to S3. Here is a guide on how to do that: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/S3DataExport.HowItWorks.html (Note: DynamoDB can export your table data in two formats: DynamoDB JSON and Amazon Ion)
Another way to approach this is by directly exporting your DynamoDB table into a .csv then uploading that file to S3: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/workbench.querybuilder.exportcsv.html
You can also use AWS Glue to transfer your table from DynamoDB to S3 (Although Glue can be a bit of a learning curve), the documentation should give you the tools you need: https://docs.aws.amazon.com/glue/latest/dg/how-it-works.html
Sagemaker Data Wrangler is also able to import data from many sources other than S3, although DynamoDB is not supported yet. You can check out support data sources for Data Wrangler here: https://docs.aws.amazon.com/sagemaker/latest/dg/data-wrangler.html
Hope this helps, and please let me know if you require anything else!
Hello there,
Yes, there is no direct connection between Dynomodb and Sagemaker. You should export data to S3 then read it from Sakemaker or you can use glue or EMR to create connection between them.
You can check the following documentation:
Relevant content
- asked 4 years ago
- AWS OFFICIALUpdated a month ago