Skip to content

New serverless pattern - lambda-invoicing-bedrock-cdk#3195

Open
NithinChandranR-AWS wants to merge 1 commit into
aws-samples:mainfrom
NithinChandranR-AWS:NithinChandranR-AWS-feature-lambda-invoicing-bedrock-cdk
Open

New serverless pattern - lambda-invoicing-bedrock-cdk#3195
NithinChandranR-AWS wants to merge 1 commit into
aws-samples:mainfrom
NithinChandranR-AWS:NithinChandranR-AWS-feature-lambda-invoicing-bedrock-cdk

Conversation

@NithinChandranR-AWS

@NithinChandranR-AWS NithinChandranR-AWS commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Summary

New pattern: Automated AWS Invoice Retrieval and Analysis with Amazon Bedrock

Amazon EventBridge triggers an AWS Lambda function monthly that retrieves invoices via the new AWS Invoicing APIs (ListInvoiceSummaries, GetInvoicePDF), archives PDFs to Amazon S3, and generates cost analysis summaries using Amazon Bedrock.

Pattern details

  • Language: Python
  • Framework: AWS CDK
  • Level: 200

Composition

  • Amazon EventBridge — monthly scheduled trigger
  • AWS Lambda — orchestrates invoice retrieval and analysis
  • AWS Invoicing APIs — programmatic invoice access (launched June 25, 2026)
  • Amazon S3 — PDF archive with lifecycle transitions
  • Amazon Bedrock (Claude Sonnet 4) — cost analysis and optimization recommendations

Removing any service breaks the pattern: no EventBridge = no automation, no Lambda = no orchestration, no S3 = no archive, no Bedrock = no intelligent analysis.

Testing

Deployed and tested in us-east-1. Results:

  • 1 invoice retrieved
  • PDF archived to Amazon S3
  • Amazon Bedrock generated structured executive summary with spend breakdown and recommendations

…nalysis

Amazon EventBridge scheduled AWS Lambda retrieves invoices via new
Invoicing APIs (ListInvoiceSummaries, GetInvoicePDF), archives PDFs
to Amazon S3, and uses Amazon Bedrock to generate cost analysis with
optimization recommendations.

Deployed and tested: 1 invoice retrieved, PDF archived (60KB),
Amazon Bedrock analysis generated with spend summary and recommendations.
@NithinChandranR-AWS

Copy link
Copy Markdown
Contributor Author

"What does this solve that Cost Explorer doesn't?"

The Real Enterprise Pain Point

Enterprise customers have:

  1. Multiple AWS Organizations (M&A, subsidiaries, regional entities, MSP-managed accounts)
  2. Invoice Units mapped to business entities (BU chargebacks, cost centers, legal entities)
  3. Monthly close cycles where finance teams manually download 50-200 PDFs from different payer accounts, rename them, reconcile them against POs, and feed them into SAP/Oracle ERP

The June 25, 2026 blog quotes: "If you manage invoices for dozens or hundreds of AWS payer accounts, you face repetitive console logins, individual file downloads, and manual data entry into your financial systems."

hence the PR. Thanks.

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