Controlling Access to Amazon Connect Chat Public API

1. Use AWS IAM Policies (Identity and Access Management)

Amazon Connect Chat APIs are often called from client applications using AWS credentials (temporary or otherwise). IAM policies allow you to control who can access which API operations.

Control who can call the API:

  • Create IAM roles or use Cognito Identity Pools
  • Restrict permissions by API actions (e.g., StartChatContact, SendMessage)
  • Limit access to specific Connect instances
  • Restrict by source IP using conditions

Example condition to limit access by IP address:

{
  "Condition": {
    "IpAddress": {
      "aws:SourceIp": "203.0.113.0/24"
    }
  }
}

2. Use Amazon Cognito for Authenticated Chat Clients

When embedding chat into web or mobile apps, Amazon Connect often uses Amazon Cognito to manage access. Cognito can be configured to:

  • Authenticate and authorize users or guests
  • Restrict sign-ups or logins to specific domains or email patterns
  • Apply custom validation logic such as geofencing or captchas

3. Restrict API Calls by Region and Origin

a. Geo-blocking using AWS WAF

If you’re exposing the API via API Gateway or CloudFront, add WAF rules to:

  • Block or allow specific countries or IP ranges
  • Protect from bots and known malicious actors

b. CORS Policies

For browser-based clients, configure CORS (Cross-Origin Resource Sharing) headers to limit which domains can make requests to the API.

4. Use VPC Endpoints (If Using Private Integrations)

If integrating Amazon Connect with other AWS services inside a VPC (e.g., Lambda), restrict access through:

  • VPC endpoints
  • Security groups and routing tables
  • Resource-based policies that allow traffic only from specific VPCs or subnets

5. Rate Limiting and API Throttling

Amazon Connect has built-in throttling, but you can also enforce limits via API Gateway:

  • Define custom rate limits per user, IP, or application
  • Monitor usage via Amazon CloudWatch or AWS X-Ray

6. Use Signed API Requests

All Amazon Connect API calls must be signed using AWS Signature Version 4. This ensures:

  • Only clients with valid AWS credentials can call the API
  • Requests are encrypted and authenticated
  • You can rotate or revoke credentials at any time

Summary

Security Layer What It Controls
IAM Policies Who can call which APIs from which IPs
Cognito End-user access via web or mobile apps
WAF Blocks traffic from certain regions or IPs
CORS Restricts web browser origins
API Gateway Throttling Rate limits and abuse protection
AWS SigV4 Cryptographically signed API requests