Add AgentCore WebRTC example with KVS managed TURN#195
Conversation
|
Nice! It looks like the code in this PR is mostly just a copy-paste of the base WebRTC example, with the KVS changes applied on top. If so: note that a few changes to the WebRTC example (only small things) landed after the changes in this PR, so we might want to "rebase" this PR to pick those up. |
| ] | ||
| }, | ||
| { | ||
| "Sid": "KVSTurnCredentials", |
There was a problem hiding this comment.
Maybe we should also mention in the README (and/or env.example, after the changes from #196 have been applied) that these permissions are also required for the AWS account the server is running under.
Adds a new deployment example (aws-agentcore-webrtc-kvs) that uses Amazon Kinesis Video Streams for TURN credential provisioning instead of non-AWS TURN providers. This eliminates external dependencies for NAT traversal by fetching temporary, auto-rotating TURN credentials via the KVS GetIceServerConfig API. Changes synced with latest base WebRTC example updates from pipecat-ai#196. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
4d58cc3 to
fd140e7
Compare
|
Addressed both points:
Also removed "Pipecat Cloud" references from comments per separate request. |
|
Looks great! 👏 |
Summary
aws-agentcore-webrtc-kvs) that uses Amazon Kinesis Video Streams for TURN credential provisioning instead of non-AWS TURN providersGetIceServerConfigAPIKey changes
agent/pipecat-agent.pyandserver/server.py: Addedget_kvs_ice_servers()that callsDescribeSignalingChannel→GetSignalingChannelEndpoint→GetIceServerConfigscripts/setup-iam-role.sh: AddedKVSTurnCredentialsIAM policy for KVS accessICE_SERVER_URLS/ICE_SERVER_USERNAME/ICE_SERVER_CREDENTIALenv vars with a singleKVS_CHANNEL_NAME-kvs-suffix to avoid conflicts with the existingaws-agentcore-webrtcexampleTest plan
./scripts/configure.shand./scripts/launch.shchrome://webrtc-internalsforrelaycandidate type)🤖 Generated with Claude Code