AI Cloud Architect

Build a serverless AI Gateway architecture with AWS AppSync Events

AWSHow-to by Archie CowanAWS Artificial Intelligence Blog

In this post, we discuss how to use AppSync Events as the foundation of a capable, serverless, AI gateway architecture. We explore how it integrates with AWS services for comprehensive coverage of the capabilities offered in AI gateway architectures. Finally, we get you started on your journey with sample code you can launch in your account and begin building.

Read the original (opens the source's page in a new tab)

AI: Summary

What it is

AppSync Events can serve as the real-time front end of a serverless AI gateway, with Lambda, Bedrock Converse streaming, DynamoDB token metering and CloudWatch/Athena analytics, plus a deployable sample.

Who it is for

Architects and developers building a multi-user chat assistant on Bedrock who need per-user authorization and token rate limits.

Key points

  • Per-user channels are authorized by a Lambda handler that matches the Cognito sub claim to the channel path.
  • Token usage is tracked in DynamoDB with atomic counters for 10-minute rolling and monthly windows.
  • Sample app cost is estimated at $35-55 per month for light development use.