Skip to content

New serverless pattern - s3-bedrock-data-automation-sam - #3266

Open
manishh-13 wants to merge 1 commit into
aws-samples:mainfrom
manishh-13:manishh-13-feature-bedrock-data-automation
Open

New serverless pattern - s3-bedrock-data-automation-sam#3266
manishh-13 wants to merge 1 commit into
aws-samples:mainfrom
manishh-13:manishh-13-feature-bedrock-data-automation

Conversation

@manishh-13

Copy link
Copy Markdown

New serverless pattern: s3-bedrock-data-automation-sam

Extract structured data from files uploaded to Amazon S3 (documents, images, video, audio) using Amazon Bedrock Data Automation - no ML code.

How it works

  • A file uploaded to the input/ prefix raises an S3 ObjectCreated event that triggers an AWS Lambda function.
  • The function calls the BDA runtime InvokeDataAutomationAsync API (fire-and-forget) with the input file, an output location, and the Bedrock Data Automation project.
  • Bedrock Data Automation runs the managed extraction and writes structured JSON to the output/ prefix (Markdown text, tables, and a generative summary).

Why it is low-code

  • The Bedrock Data Automation project is a native CloudFormation resource (AWS::Bedrock::DataAutomationProject), so the pipeline is infrastructure as code and the Lambda is only a thin trigger.
  • Least-privilege IAM: the function may read/write only the pattern bucket and invoke only Bedrock Data Automation.

Notes

  • Change what is extracted by editing the project resource: add Image/Video/Audio blocks or attach a custom-output blueprint for typed fields.
  • The system profile us.data-automation-v1 is a cross-region (US geo) profile, so the profile ARN is region-wildcarded in the IAM policy (BDA may route the job to any US region).

Includes README.md, template.yaml (AWS SAM), example-pattern.json, and src/ (Python 3.13). Level 200. Deployed and tested end-to-end.

Pattern-submission issue to follow, linking this PR.

Serverless pipeline that extracts structured data from files uploaded to
Amazon S3 (documents, images, video, audio) using Amazon Bedrock Data
Automation. An S3 ObjectCreated event triggers a Lambda that starts an
async BDA job; BDA writes structured JSON (Markdown text, tables,
generative summary) to the output prefix. The BDA project is a native
CloudFormation resource, so custom code is minimal. Python 3.13, SAM.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants