Install
$ agentstack add skill-aws-samples-sample-ai-agent-skills-connect-troubleshooting ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Amazon Connect Diagnostics
When to use
Any Amazon Connect investigation where the console alone is insufficient — call routing failures, agent state issues, contact flow errors, telephony quality problems, integration failures (Lambda, Lex), CCP connectivity, metrics gaps, or channel-specific issues (voice, chat, tasks).
Investigation workflow
Step 1 — Collect and triage
# Get instance details
aws connect describe-instance --instance-id
# Check instance status and configuration
aws connect list-instance-attributes --instance-id
# Get recent contact details (if contact ID known)
aws connect describe-contact --instance-id --contact-id
# Check current agent status
aws connect get-current-metric-data --instance-id \
--filters '{"Queues":[""]}' \
--current-metrics '[{"Name":"AGENTS_AVAILABLE","Unit":"COUNT"},{"Name":"AGENTS_ON_CALL","Unit":"COUNT"},{"Name":"CONTACTS_IN_QUEUE","Unit":"COUNT"}]'
# Check contact flow logs (if enabled)
aws logs filter-log-events --log-group-name /aws/connect/ --filter-pattern "ERROR"
Triage returns:
- Instance configuration and enabled features
- Contact details and disconnect reasons
- Agent availability and queue state
- Contact flow execution errors
If the instance itself is unreachable, that IS the root cause domain. Don't chase routing or agent symptoms.
Step 2 — Domain deep dive (only if needed)
# Contact flow details
aws connect describe-contact-flow --instance-id --contact-flow-id
# Queue configuration
aws connect describe-queue --instance-id --queue-id
# Routing profile
aws connect describe-routing-profile --instance-id --routing-profile-id
# Hours of operation
aws connect describe-hours-of-operation --instance-id --hours-of-operation-id
# Phone number details
aws connect describe-phone-number --phone-number-id
# Lambda function associations
aws connect list-lambda-functions --instance-id
# Lex bot associations
aws connect list-lex-bots --instance-id
Read references/connect-guardrails.md before concluding on any Connect issue.
Step 3 — Detailed path (low-confidence cases only)
# Contact trace records (via Kinesis or S3)
aws s3 ls s3:///connect//ContactTraceRecords/
# CloudTrail for API-level events
aws cloudtrail lookup-events --lookup-attributes AttributeKey=EventSource,AttributeValue=connect.amazonaws.com
# CloudWatch metrics for telephony
aws cloudwatch get-metric-statistics --namespace AWS/Connect --metric-name CallsPerInterval ...
aws cloudwatch get-metric-statistics --namespace AWS/Connect --metric-name MisconfiguredPhoneNumbers ...
# Real-time metrics for queue health
aws connect get-current-metric-data --instance-id \
--filters '{"Queues":[""]}' \
--current-metrics '[{"Name":"OLDEST_CONTACT_AGE","Unit":"SECONDS"},{"Name":"CONTACTS_IN_QUEUE","Unit":"COUNT"}]'
Tool quick reference
| Tool / API | When to use | |------------|-------------| | describe-instance | Instance config, status, features | | list-instance-attributes | Enabled features (contact flow logs, streaming, etc.) | | describe-contact | Specific contact details, disconnect reason | | describe-contact-flow | Contact flow definition and metadata | | describe-queue | Queue config, outbound caller ID, hours | | describe-routing-profile | Agent routing config, queue priorities | | describe-hours-of-operation | Business hours configuration | | describe-phone-number | Phone number status, target flow | | get-current-metric-data | Real-time queue and agent metrics | | get-metric-data-v2 | Historical metrics and analytics | | list-lambda-functions | Lambda integrations | | list-lex-bots | Lex bot integrations | | search-contacts | Search contacts by criteria | | describe-user | Agent user configuration | | describe-user-hierarchy-group | Agent hierarchy |
Gotchas: Amazon Connect
These are the mistakes commonly made during Connect troubleshooting.
- Contact flow logs must be explicitly ENABLED on the instance AND on each contact flow. Enabling on the instance alone is not enough.
- Contact flows have a 32 KB size limit for the flow definition. Complex flows hit this limit and fail to publish.
- Lambda functions invoked from contact flows have an 8-second timeout. This is NOT configurable — it's a hard Connect limit regardless of the Lambda function's own timeout setting.
- DTMF input is only captured during "Get customer input" blocks. "Play prompt" blocks do NOT capture DTMF.
- Queue transfer vs direct transfer: queue transfer puts the contact in a queue for the next available agent. Direct transfer sends to a specific agent or external number.
- Agents must be in "Available" status to receive contacts. "Routable" custom statuses do NOT route contacts unless explicitly configured.
- CCP (Contact Control Panel) requires WebRTC. It needs specific ports and domains whitelisted. Corporate firewalls and VPNs commonly block CCP connectivity.
- Phone numbers are region-specific. A number claimed in us-east-1 cannot be used by an instance in eu-west-2.
- Outbound calls require a caller ID number that is claimed in the Connect instance. You cannot spoof arbitrary caller IDs.
- Contact trace records (CTRs) are delivered asynchronously. They may take up to 24 hours to appear in the default reporting. Use Kinesis streaming for near-real-time CTR delivery.
- Historical metrics have a 24-hour delay for some aggregations. Real-time metrics are available immediately but only show current state.
- Connect uses a soft phone (CCP) by default. Desk phones are supported but add latency and are subject to PSTN quality.
- Quick connects define transfer targets. Without a quick connect, agents cannot transfer calls to that destination.
- Contact attributes are key-value pairs passed through the contact flow. They have a 32 KB total size limit per contact.
- Lex bots in contact flows use streaming for voice. The Lex bot must be in the same region as the Connect instance.
Contact flow block types
| Block | Purpose | |-------|---------| | Play prompt | Play audio or TTS (no input capture) | | Get customer input | Capture DTMF or Lex intent | | Set working queue | Set the queue for transfer | | Transfer to queue | Route contact to a queue | | Transfer to phone number | Transfer to external number | | Transfer to flow | Transfer to another contact flow | | Invoke AWS Lambda | Call Lambda (8s timeout) | | Set contact attributes | Set key-value pairs on contact | | Check contact attributes | Branch on attribute values | | Check hours of operation | Branch on business hours | | Check queue status | Branch on queue metrics | | Loop | Repeat a section | | Disconnect / hang up | End the contact |
Agent states
| State | Receives contacts? | |-------|--------------------| | Available | Yes | | On call | No (already on contact) | | After call work (ACW) | No | | Offline | No | | Custom (routable) | Only if configured | | Custom (non-routable) | No | | Missed | No (auto-set after missed contact) | | Error | No |
Disconnect reasons
| Reason | Meaning | |--------|---------| | CUSTOMERDISCONNECT | Customer hung up | | AGENTDISCONNECT | Agent hung up | | THIRDPARTYDISCONNECT | Third party hung up | | TELECOMPROBLEM | Telephony issue | | CONTACTFLOW_DISCONNECT | Flow ended the contact | | OTHER | Unclassified |
Gotchas: CCP and Connectivity
- CCP requires WebRTC with TURN/STUN. Ports 3478 (UDP/TCP) must be open.
- CCP requires access to .awsapps.com, .amazonaws.com, and *.cloudfront.net domains.
- VPN split tunneling can cause CCP audio issues. Media traffic should not go through VPN.
- Browser requirements: Chrome or Firefox latest. Safari and Edge have limited support.
- CCP softphone uses opus codec. Network jitter > 30ms or packet loss > 0.5% causes audible quality issues.
- Multiple CCP tabs cause agent state conflicts. Only one CCP session per agent.
Gotchas: Telephony
- Toll-free numbers have per-minute costs for inbound calls. DID numbers have monthly fees.
- Number porting takes 2-4 weeks and requires LOA (Letter of Authorization) from the current carrier.
- Emergency calling (E911) requires specific configuration and is not automatic.
- International calling must be explicitly enabled per country and has separate rate tables.
- Outbound calling campaigns require specific compliance configurations (TCPA, etc.).
Anti-hallucination rules
- Always cite specific contact flow logs, CTR data, CloudWatch metrics, or API responses as evidence.
- Lambda timeout in Connect is 8 seconds. Never claim it can be increased beyond 8 seconds.
- Contact flow logs require enablement at BOTH instance and flow level. Never claim instance-level enablement is sufficient.
- DTMF is only captured in "Get customer input" blocks. Never claim other blocks capture DTMF.
- CTRs can take up to 24 hours. Never claim CTRs are available immediately without Kinesis streaming.
- Spend no more than 2 minutes on any single hypothesis. Pivot if inconclusive.
36 runbooks
Runbooks are organized by failure domain. Use the appropriate runbook based on the symptom category.
| Category | IDs | Covers | |----------|-----|--------| | A — Contact Flow | A1-A4 | Flow errors, publish failures, loop/timeout, attribute issues | | B — Call Routing | B1-B4 | Queue routing failures, hours of operation, priority/overflow, skills-based routing | | C — Agent Issues | C1-C4 | Login failures, state problems, missed contacts, CCP connectivity | | D — Telephony | D1-D4 | Inbound call failures, outbound call failures, call quality, DTMF issues | | E — Integrations | E1-E4 | Lambda timeout/errors, Lex bot failures, Kinesis streaming, S3 recording | | F — Channels | F1-F3 | Chat issues, task channel issues, multi-channel routing | | G — Metrics & Reporting | G1-G3 | Missing CTRs, real-time metrics gaps, historical reporting issues | | H — Security & Access | H1-H3 | SAML/SSO failures, IAM permissions, security profile issues | | I — Phone Numbers | I1-I3 | Number claiming failures, porting issues, caller ID problems | | Z — Catch-All | Z1 | General troubleshooting |
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: aws-samples
- Source: aws-samples/sample-ai-agent-skills
- License: MIT-0
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.