You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用AWS CloudFormation申领Amazon Connect电话号码失败求助

AWS Connect电话号码部署失败排查

我使用以下CloudFormation模板部署栈,其中AWS::Connect::Instance已成功部署,但AWS::Connect::PhoneNumber资源持续部署失败:

---

Resources:
  # This has already been deployed successfully.
  ConnectInstance:
    Type: AWS::Connect::Instance
    Properties:
      Attributes:
        InboundCalls: True
        OutboundCalls: True
      IdentityManagementType: CONNECT_MANAGED
      InstanceAlias: !Ref AWS::StackName

  # This keeps failing to deploy.
  PhoneNumber:
    Type: AWS::Connect::PhoneNumber
    Properties: 
      CountryCode: US
      TargetArn: !GetAtt ConnectInstance.Arn
      Type: TOLL_FREE

Outputs:
  PhoneNumber:
    Value: !GetAtt PhoneNumber.Address

部署失败时的报错信息:

Resource handler returned message: "Resource of type 'AWS::Connect::PhoneNumber' with identifier 'ARN_REDACTED' did not stabilize." (RequestToken: 77acda15-2de4-3152-ff11-0e972d1840d1, HandlerErrorCode: NotStabilized)

同时,手动在实例上申领号码时,从未成功申领过却收到配额已达的错误。

排查与解决步骤

  • 确认区域号码库存:US区域的 toll-free 号码可能临时缺货,尝试切换至其他AWS区域,或改用本地号码(将Type设为DID)测试部署。
  • 核查Service Quotas配额:
    1. 登录AWS控制台,进入Service Quotas服务
    2. 搜索“Amazon Connect”,找到Phone numbers per instance配额项
    3. 查看已用配额数量,若已用数大于0,说明之前的失败部署占用了配额,可提交配额调整申请,或联系AWS支持清理无效占用
  • 显式添加资源依赖:在CloudFormation模板中给PhoneNumber资源添加DependsOn,确保实例完全就绪后再创建号码:
    PhoneNumber:
      Type: AWS::Connect::PhoneNumber
      DependsOn: ConnectInstance
      Properties: 
        CountryCode: US
        TargetArn: !GetAtt ConnectInstance.Arn
        Type: TOLL_FREE
    
  • 清理残留异常资源:登录Connect控制台,进入目标实例的号码管理页面,删除任何状态异常(如未激活、创建中)的号码,再重新部署栈
  • 验证实例状态:确保Connect实例处于ACTIVE状态,可通过AWS CLI执行以下命令检查:
    aws connect describe-instance --instance-id <你的实例ID>
    

内容的提问来源于stack exchange,提问作者Grayson Cox

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.01 02:55:40