Understand your AWS data from a SageMaker notebook¶
Install it in your notebook and get readable reports on each AWS service: what's there, what it costs, and what to do next, without leaving Jupyter.
- One install, boto3 only
- Read-only: never changes your data
- Plain text outside Jupyter
Guides¶
Each guide covers setting up in SageMaker, every command with examples of its output, and the IAM permissions it needs.
-
s3.pyAmazon S3
Buckets and the files in them.
- Every bucket's size, monthly cost and risks
- Folder trees, and search by name, size or date
- Preview CSV, Parquet, JSON, Excel, PDF, Word and more
- Cut storage costs and recover deleted files
-
s3_explorer.pyS3 file explorer
Click through buckets and folders, and see inside each file.
- Your buckets and folders, one click at a time
- What's inside a file, as soon as you click it
- PDFs page by page, Word files with their pictures
- A folder as one .zip, after checking it fits
-
dynamodb.pyAmazon DynamoDB
Tables and the items in them.
- Every table's key, size, billing and cost
- Scan, query and get items as plain tables
- Which attributes the items hold, and their types
- The read units each report used; scans stop early
-
bedrock_kb.pyAmazon Bedrock Knowledge Bases
Knowledge bases, what they retrieve, and the answers built on them.
- An explorer window: every file, and how it was indexed
- Settings in plain English, sync health and failed files
- Search with highlighted passages; answers with each claim linked to its source
- Compare search settings and measure retrieval hit rate
-
bedrock_chat.pyBedrock knowledge base chat
A chat window on a knowledge base, with every setting in reach.
- Pick the knowledge base and the model; answers stream in
- Each answer's citations, sources, request and response, or only the search behind it
- Any RetrieveAndGenerate setting, and the setup as Python, JSON or an AWS CLI command
- Test a list of questions, and see which did better after a change
-
sagemaker_env.pyAmazon SageMaker
The notebook you're working in, and everything else SageMaker bills you for.
- This notebook's type, cost so far and idle shutdown
- Its CPU, memory, disk and GPU use right now
- What fills the disk, and what's safe to clear
- What's running in the region, and what looks forgotten
-
opensearch.pyAmazon OpenSearch
Vector indexes in OpenSearch Service domains and Serverless collections.
- Every vector field in plain English: size, engine, similarity
- Whether the graphs fit in the memory the nodes have
- Documents without a vector; zero or repeated vectors
- The nearest neighbours of a question, a vector or a document
-
lambda_functions.pyAWS Lambda
Lambda functions, in one region or all of them.
- An explorer window: every function, and its logs run by run
- Every function's runtime, triggers, calls, errors and cost
- Runtimes losing support, and functions anyone can call
- Errors grouped by cause, from the function's own logs
- Memory used and cold starts, and the size that would do
Every service works the same way¶
%pip install aws-analyzer gives you every service, and only needs boto3, which SageMaker already has. Each guide shows how to install it, from a bucket too when the notebook has no internet access.
from aws_analyzer import S3View # or DynamoDBView, BedrockKBView, SageMakerView, OpenSearchView, LambdaView
ui = S3View() # uses the notebook's IAM role; nothing to configure
ui.help() # every command, grouped by task; ui.help("name") shows one in full
s3 = ui.core # the analyzer behind the view: returns data instead of a report
Every report reads the same way: cards with the numbers that matter (amber or red when something needs a look), findings that each end in what to do, the tables of detail, and a Next row of the commands worth running next, with the arguments already filled in. One click on any command in a report selects all of it, ready to copy.