{"slug": "amazon-s3-annotations-attach-rich-queryable-context-directly-to-your-objects", "title": "Amazon S3 annotations: attach rich, queryable context directly to your objects", "summary": "Amazon Web Services announced S3 annotations, a new metadata capability for Amazon Simple Storage Service (S3) that allows users to attach up to 1 GB of rich, queryable context per object in flexible formats. The feature supports AI agents and autonomous workflows by enabling mutable, large-scale metadata that moves with objects during transfers and can be queried via Amazon Athena.", "body_md": "[AWS News Blog](https://aws.amazon.com/blogs/aws/)\n\n# Amazon S3 annotations: attach rich, queryable context directly to your objects\n\n|\n|\n\nToday, we’re announcing a new metadata capability for [Amazon Simple Storage Service (Amazon S3)](https://aws.amazon.com/s3/) called annotations, enabling you to attach rich, large-scale business context directly to your objects. You can store up to 1,000 named annotations per object, each up to 1 MB in size, totaling up to 1 GB per object, in flexible formats like JSON, XML, YAML, or plain text. You can modify or delete an annotation at any time, without re-writing your objects, making it easy to keep your object context current.\n\nOrganizations are building AI agents and autonomous workflows that need to find, understand, and act on data without human intervention. To support these agentic workflows, you need metadata that can evolve alongside the data, scale to petabytes of objects, and remain queryable without expensive retrieval.\n\nWith S3 annotations, you can store context such as AI-generated transcripts, content ratings, or technical specifications directly alongside your objects. Your context moves automatically with the object during copy, replication, and cross-region transfers, and S3 removes it when you delete the object. When you enable [S3 Metadata](https://aws.amazon.com/s3/features/metadata/), annotations automatically flow into fully managed annotation tables that you can query with [Amazon Athena](https://aws.amazon.com/athena/) and other analytics engines.\n\n**Common use cases**\n\nAnnotations solve complex metadata challenges across industries:\n\n**Media & Entertainment**: Track transcripts, content moderation results, subtitle files, and licensing metadata as separate annotations on video assets, eliminating the need to synchronize metadata across multiple media asset management systems.**Financial Services**: Attach AI-generated investment summaries and sentiment analysis to research documents, enabling autonomous research agents to discover relevant datasets through natural-language queries without maintaining separate metadata databases.**Life Sciences**: Annotate clinical trial data with regulatory status, patient cohort details, and approval chains, making compliance audits faster while keeping full context accessible for archived data in Amazon S3 Glacier storage classes without retrieval charges.\n\n**How annotations address metadata challenges**\n\nAmazon S3 already supports several ways to describe your objects. System-defined metadata captures properties like size and storage class. Object tags support operational tasks like access control and lifecycle management. User-defined metadata lets you add small amounts of custom information at upload time.\n\nWhile these capabilities work well for their intended purposes, they have limitations when you need to attach much richer context without building and maintaining separate metadata systems. Annotations address these needs by providing metadata capabilities at a fundamentally different scale and flexibility, offering mutable, queryable context per object compared to 10 immutable tags or 2 KB of headers.\n\nCapability |\nMax size |\nMutable? |\nBest for |\n| System-defined metadata | Fixed | No | Object properties (size, storage class, creation time) |\n| User-defined metadata | 2 KB | No (set at upload) | Small custom key-value pairs |\n| Object tags | 10 tags, 128/256 characters per key/value | Yes | Access control, lifecycle rules, cost allocation |\nAnnotations |\n1 GB (1,000 × 1 MB) |\nYes |\nRich business context (JSON, XML, YAML, plain text) |\n\nToday, metadata describing S3 objects often lives in separate databases or sidecar files, requiring complex synchronization workflows that can exceed data storage costs. When you enable S3 Metadata annotation tables, this context becomes queryable at scale through Amazon Athena. AI agents can discover your data through natural language with the [S3 Tables MCP server](https://docs.aws.amazon.com/AmazonS3/latest/userguide/storage-lens-s3-tables-ai-tools.html), which provides a standardized interface for AI models to query your annotations. You can query annotations for objects in any storage class, without restoring the objects or paying retrieval charges.\n\n**Getting started with annotations**\n\nTo start using annotations, make sure your [AWS Identity and Access Management (IAM)](https://aws.amazon.com/iam/) policy or bucket policy grants permissions for the `s3:PutObjectAnnotation`\n\nand `s3:GetObjectAnnotation`\n\nactions. You can then add annotations to any existing or new S3 object using the `PutObjectAnnotation`\n\nAPI.\n\nFor example, a media company can attach technical specifications and AI-produced summaries to a video asset using the [AWS Command Line Interface (AWS CLI)](https://aws.amazon.com/cli/):\n\n```\n# Create a JSON file with technical metadata\ncat > mediainfo.json << 'EOF'\n{\"codec\":\"H.265\",\"resolution\":\"3840x2160\",\"audio_tracks\":8,\"frame_rate\":29.97}\nEOF\n\n# Attach it as an annotation\naws s3api put-object-annotation \\\n  --bucket my-media-bucket \\\n  --key videos/documentary-2026.mp4 \\\n  --annotation-name mediainfo \\\n  --annotation-payload ./mediainfo.json\n# Attach a plain-text AI-generated summary as a separate annotation\necho \"A 90-minute nature documentary covering wildlife migration patterns across three continents, featuring aerial footage and underwater sequences. Languages: English, Spanish, Portuguese.\" > ai_summary.txt\n\naws s3api put-object-annotation \\\n  --bucket my-media-bucket \\\n  --key videos/documentary-2026.mp4 \\\n  --annotation-name ai_summary \\\n  --annotation-payload ./ai_summary.txt\n```\n\nThese commands attach two separate annotations to the same video object. The `mediainfo`\n\nannotation stores structured technical specifications as JSON, while the `ai_summary`\n\nannotation stores a text description. Each annotation is identified by a unique name, and you can read and modify each one independently. With unique names for each annotation, you can use different annotations to support multiple concurrent enrichment workflows, for example, one team adding technical metadata while another team adds content classifications, without interfering with each other.\n\nRetrieve a specific annotation using the `GetObjectAnnotation`\n\nAPI:\n\n```\naws s3api get-object-annotation \\\n  --bucket my-media-bucket \\\n  --key videos/documentary-2026.mp4 \\\n  --annotation-name mediainfo \\\n  ./mediainfo-output.json\n```\n\nTo see all annotations attached to an object, use the `ListObjectAnnotations`\n\nAPI:\n\n```\naws s3api list-object-annotations \\\n  --bucket my-media-bucket \\\n  --key videos/documentary-2026.mp4\n```\n\nWhen you no longer need a specific annotation, remove it using the `DeleteObjectAnnotation`\n\nAPI:\n\n```\naws s3api delete-object-annotation \\\n  --bucket my-media-bucket \\\n  --key videos/documentary-2026.mp4 \\\n  --annotation-name mediainfo\n```\n\nYou can update an existing annotation at any time by calling `PutObjectAnnotation`\n\nagain with the same annotation name. For large objects uploaded using multipart upload, attach annotations after completing the multipart upload using the `PutObjectAnnotation`\n\nAPI.\n\n**Querying annotations at scale with S3 Metadata tables**\n\nAttaching annotations to individual objects is useful, but the real power comes when you query across all your annotations at scale. When you enable S3 Metadata annotation tables on your bucket, S3 automatically indexes your annotations into a fully managed [Apache Iceberg](https://iceberg.apache.org/) table, called an annotation table. You can query annotation tables with Amazon Athena or any Iceberg-compatible engine.\n\nTo enable annotation tables, use the S3 console or the `CreateBucketMetadataConfiguration`\n\nAPI. The following example creates a new metadata configuration with annotation tables enabled while keeping journal tables for change tracking and disabling the live inventory table:\n\n```\n{\n  \"JournalTableConfiguration\": {\n    \"RecordExpiration\": { \"Expiration\": \"DISABLED\" }\n  },\n  \"InventoryTableConfiguration\": { \"ConfigurationState\": \"DISABLED\" },\n  \"AnnotationTableConfiguration\": {\n    \"ConfigurationState\": \"ENABLED\",\n    \"Role\": \"arn:aws:iam::123456789012:role/S3MetadataAnnotationRole\"\n  }\n}\n```\n\nThis configuration tells S3 to automatically capture all your annotations in a queryable table. Once applied, any annotation you attach to objects in this bucket will appear in the table within approximately one hour.\n\nIf the bucket already has a metadata configuration, use the `UpdateBucketMetadataAnnotationTableConfiguration`\n\nAPI:\n\n```\naws s3api update-bucket-metadata-annotation-table-configuration \\\n  --bucket my-media-bucket \\\n  --annotation-table-configuration '{\"ConfigurationState\":\"ENABLED\",\"Role\":\"arn:aws:iam::123456789012:role/S3MetadataAnnotationRole\"}'\n```\n\nOnce enabled, your annotations automatically flow into the annotation table. Journal tables update in near real time, while annotation tables refresh within an hour. Unlike traditional metadata tables that require predefined schemas, annotation tables automatically adapt to any JSON, XML, or YAML structure you write. Each annotation becomes a row in the table with its content stored in a `text_value`\n\ncolumn, letting you query across all annotations without schema migrations.\n\nIf you enable annotation tables on a bucket that already has annotated objects, S3 automatically backfills existing annotations into the table. The backfill process runs in the background and can take several hours to days depending on the number of objects.\n\nFor example, to find all video assets with more than 8 audio tracks across your entire bucket using Amazon Athena:\n\n```\nSELECT DISTINCT bucket, object_key\nFROM \"s3tablescatalog/aws-s3\".\"b_my_media_bucket\".\"annotation\"\nWHERE name = 'mediainfo'\nAND CAST(json_extract_scalar(text_value, '$.audio_tracks') AS INTEGER) > 8\n```\n\nThis query scans the annotation table for all annotations named `mediainfo`\n\n, extracts the `audio_tracks`\n\nfield from the JSON content, and returns objects where the count exceeds 8.\n\nOr to find all objects that received new annotations in the last 24 hours through the journal table:\n\n```\nSELECT bucket, key, version_id, record_timestamp, annotation.name\nFROM \"s3tablescatalog/aws-s3\".\"b_my_media_bucket\".\"journal\"\nWHERE record_timestamp >= (current_date - interval '1' day)\nAND annotation.name IS NOT NULL\nAND record_type IN ('CREATE_ANNOTATION', 'DELETE_ANNOTATION')\n```\n\nThis query uses the journal table to track annotation changes in near real time, which is ideal for building event-driven workflows that respond to new or deleted annotations.\n\nYou can also use natural language to search objects by their annotations using agents in [Amazon SageMaker Unified Studio](https://aws.amazon.com/sagemaker/unified-studio/) or any IDE with the S3 Tables MCP server. For example, asking “find all PG-rated movies with Spanish subtitles from 2023” returns results in seconds instead of the hours it would take querying multiple disconnected systems.\n\n__Get started today__\n\nYou can start using Amazon S3 annotations today in all AWS Regions, including the AWS China Regions. Annotation tables are available in all AWS Regions where S3 Metadata is available.\n\nWhether you’re building AI agents that need to discover data autonomously, managing petabytes of media assets with complex metadata, or tracking compliance context for archived datasets, annotations give you the scale and flexibility to attach rich metadata directly to your objects without managing separate systems.\n\nAnnotation storage is always billed at S3 Standard rates, even if the parent object is in S3 Glacier or another storage class. For full pricing details, visit the [Amazon S3 pricing page](https://aws.amazon.com/s3/pricing/).\n\nTo learn more and get started, visit the [Amazon S3 Metadata overview page](https://aws.amazon.com/s3/features/metadata/) and the [Amazon S3 documentation](https://docs.aws.amazon.com/AmazonS3/latest/userguide/annotations.html). Send feedback to [AWS re:Post for S3](https://repost.aws/tags/TADSTjraA0Q4-a1dxk6eUYaw/amazon-simple-storage-service) or through your usual AWS Support contacts.\n\nDaniel Abib", "url": "https://wpnews.pro/news/amazon-s3-annotations-attach-rich-queryable-context-directly-to-your-objects", "canonical_source": "https://aws.amazon.com/blogs/aws/amazon-s3-annotations-attach-rich-queryable-context-directly-to-your-objects/", "published_at": "2026-06-16 23:13:10+00:00", "updated_at": "2026-06-16 23:24:36.895302+00:00", "lang": "en", "topics": ["ai-agents", "ai-infrastructure", "ai-tools"], "entities": ["Amazon Web Services", "Amazon Simple Storage Service", "Amazon S3", "Amazon Athena", "S3 Metadata", "S3 Tables MCP server"], "alternates": {"html": "https://wpnews.pro/news/amazon-s3-annotations-attach-rich-queryable-context-directly-to-your-objects", "markdown": "https://wpnews.pro/news/amazon-s3-annotations-attach-rich-queryable-context-directly-to-your-objects.md", "text": "https://wpnews.pro/news/amazon-s3-annotations-attach-rich-queryable-context-directly-to-your-objects.txt", "jsonld": "https://wpnews.pro/news/amazon-s3-annotations-attach-rich-queryable-context-directly-to-your-objects.jsonld"}}