[{"data":1,"prerenderedAt":78},["ShallowReactive",2],{"pattern-lambda-invoicing-bedrock-cdk":3},{"id":4,"title":5,"architectureURL":6,"cleanup":7,"contributors":11,"deploy":13,"description":18,"extension":19,"framework":20,"gitHub":21,"highlight":6,"introBox":27,"language":35,"level":36,"meta":37,"patternArch":38,"resources":64,"s3URL":6,"services":6,"stem":72,"testing":73,"videoId":6,"__hash__":77},"patterns\u002Fpatterns\u002Flambda-invoicing-bedrock-cdk.json","Automated AWS Invoice Retrieval and Analysis with Amazon Bedrock",null,{"text":8},[9,10],"Warning: This will delete the Amazon S3 bucket and all archived invoices.","\u003Ccode>cdk destroy\u003C\u002Fcode>",[12],"content\u002Fcontributors\u002Fnithin-chandran-r.json",{"text":14},[15,16,17],"\u003Ccode>cdk bootstrap\u003C\u002Fcode>","\u003Ccode>npm install\u003C\u002Fcode>","\u003Ccode>cdk deploy\u003C\u002Fcode>","Retrieve AWS invoices programmatically, archive PDFs to Amazon S3, and generate cost analysis summaries using Amazon Bedrock.","json","AWS CDK",{"template":22},{"repoURL":23,"templateURL":24,"projectFolder":25,"templateFile":26},"https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Flambda-invoicing-bedrock-cdk","serverless-patterns\u002Flambda-invoicing-bedrock-cdk","lambda-invoicing-bedrock-cdk","lib\u002Flambda-invoicing-bedrock-stack.ts",{"headline":28,"text":29},"How it works",[30,31,32,33,34],"An Amazon EventBridge scheduled rule triggers an AWS Lambda function on the 2nd of each month.","The AWS Lambda function calls the AWS Invoicing API to list invoice summaries and download invoice PDFs via presigned URLs.","Invoice PDFs are archived to Amazon S3 with date-partitioned prefixes and lifecycle transitions to Infrequent Access.","Amazon Bedrock analyzes the invoice data and generates an executive summary with cost optimization recommendations.","The analysis results are stored alongside the PDFs in Amazon S3 for historical tracking and audit compliance.","Python","200",{},{"icon1":39,"icon2":44,"icon3":48,"icon4":53,"line1":57,"line2":60,"line3":62},{"x":40,"y":41,"service":42,"label":43},10,50,"eventbridge","Amazon EventBridge",{"x":45,"y":41,"service":46,"label":47},35,"lambda","AWS Lambda",{"x":49,"y":50,"service":51,"label":52},60,30,"s3","Amazon S3",{"x":49,"y":54,"service":55,"label":56},70,"bedrock","Amazon Bedrock",{"from":58,"to":59},"icon1","icon2",{"from":59,"to":61},"icon3",{"from":59,"to":63},"icon4",{"bullets":65},[66,69],{"text":67,"link":68},"Automate AWS Invoice Retrieval with New Programmatic APIs","https:\u002F\u002Faws.amazon.com\u002Fblogs\u002Faws-cloud-financial-management\u002Fautomate-aws-invoice-retrieval-with-new-programmatic-apis\u002F",{"text":70,"link":71},"AWS Invoicing API Reference","https:\u002F\u002Fdocs.aws.amazon.com\u002Faws-cost-management\u002Flatest\u002FAPIReference\u002FAPI_invoicing_ListInvoiceSummaries.html","patterns\u002Flambda-invoicing-bedrock-cdk",{"text":74},[75,76],"Invoke the AWS Lambda function manually to test invoice retrieval:","\u003Ccode>aws lambda invoke --function-name $(aws cloudformation describe-stacks --stack-name LambdaInvoicingBedrockStack --query 'Stacks[0].Outputs[?OutputKey==`FunctionName`].OutputValue' --output text) --payload '{}' response.json && cat response.json\u003C\u002Fcode>","e2a1WkywQruUQ4XSF9iJRNAGps_TpN-AvsktkIgNOEE",1785839766805]