sfn-invoicing-bedrock-chargeback-cdk: Multi-BU invoice reconciliation with Step Functions and Bedrock#3207
Open
NithinChandranR-AWS wants to merge 2 commits into
Conversation
…nciliation pattern Step Functions Map state iterates AWS Invoice Units in parallel, fetches per-unit invoices via Invoicing APIs, runs Amazon Bedrock chargeback analysis, and writes allocations to Amazon DynamoDB ledger.
…PI params Correct API parameters: Selector (required) with ResourceType/Value, Filter.TimeInterval (not TimeRange), 30-day max window. Add STS permission for account ID lookup.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Deploy an AWS Step Functions state machine that iterates AWS Invoice Units via Map state, retrieves per-BU invoice summaries and PDFs, archives to Amazon S3, runs cross-BU variance analysis with Amazon Bedrock, and writes chargeback allocations to Amazon DynamoDB.
Architecture
AWS Step Functions (Map state) → AWS Lambda (list Invoice Units + fetch invoices) → Amazon S3 (PDF archive by BU) → Amazon Bedrock (cross-BU chargeback analysis) → Amazon DynamoDB (ledger) + Amazon SNS (notifications)
Deployed and Tested
Stack deploys in us-east-1. Created test Invoice Unit (TestBU), executed SFN successfully in ~30s. Bedrock generated chargeback allocation JSON. DynamoDB ledger entry confirmed. Test unit cleaned up.
Checklist