aws AWS Big Data Blog ·

AWS AI agent optimizes Kinesis Data Streams costs

blogaiawsgaengineermediaaws-kinesisaws-bedrock
announcement

This post details an AI-powered agent built on Amazon Bedrock that automatically analyzes Amazon Kinesis Data Streams usage and recommends optimal capacity modes. It addresses the challenge of manually comparing costs across Provisioned, On-demand Standard, and On-demand Advantage modes, which is impractical for large numbers of streams. The agent provides daily or weekly reports on cost savings and eligibility for On-demand Advantage, reducing manual effort and potential for cost overruns or throttling.

  • AI agent for Kinesis Data Streams cost optimization
  • Agent architecture and workflow
  • Prerequisites for deployment
  • Deployment and testing procedure
  • Benefits of autonomous cost optimization
Notes (5)
  • AI agent for Kinesis Data Streams cost optimization

    An open-source, serverless solution is available that uses Amazon Bedrock AgentCore to analyze Kinesis Data Streams usage, discover Enhanced Fan-Out consumers, and compute a three-way cost comparison across capacity modes. The agent aims to simplify the decision-making process for switching capacity modes and enabling On-demand Advantage pricing.

  • Agent architecture and workflow

    The solution employs Amazon EventBridge to trigger a Scheduler Lambda, which invokes Amazon Bedrock AgentCore. AgentCore, powered by Claude Sonnet, routes requests to a Tool Lambda that interacts with Kinesis Data Streams for stream details, CloudWatch for metrics, and Amazon S3 for storing generated HTML and JSON reports. The entire stack is deployable via AWS CDK.

  • Prerequisites for deployment

    To deploy the agent, users need AWS CDK installed, Python 3.12+, aws-cdk-lib >= 2.251.0, a configured AWS CLI with necessary permissions, and access to Amazon Bedrock models like Claude Sonnet 4.5 in the target region.

  • Deployment and testing procedure

    The agent can be deployed by cloning the repository, installing dependencies, setting the target region, bootstrapping CDK, and running a single `cdk deploy` command. Testing involves AWS CLI commands, and reports are accessible via Amazon S3. The agent is region-specific and can be deployed across multiple regions by repeating the process.

  • Benefits of autonomous cost optimization

    Deploying this agent offers benefits such as reducing streaming costs by identifying optimal capacity modes, alleviating throttling risks by catching under-provisioned streams, and freeing up teams from repetitive operational tasks through automated, scheduled optimization.

Read the original announcement →

https://aws.amazon.com/blogs/big-data/ai-powered-cost-optimization-agent-for-amazon-kinesis-data-streams/

Related releases