使用AWS CloudFormation声明一个Amazon Connect电话号码。

huangapple go评论70阅读模式
英文:

Claim an Amazon Connect phone number with AWS CloudFormation?

问题

我正在尝试使用这个模板部署一个CloudFormation堆栈。


资源:

这已经成功部署。

ConnectInstance:
类型: AWS::Connect::Instance
属性:
属性:
入站呼叫: True
出站呼叫: True
身份管理类型: CONNECT_MANAGED
实例别名: !Ref AWS::StackName

这一直无法成功部署。

PhoneNumber:
类型: AWS::Connect::PhoneNumber
属性:
国家码: US
目标Arn: !GetAtt ConnectInstance.Arn
类型: TOLL_FREE

输出:
PhoneNumber:
值: !GetAtt PhoneNumber.Address


然而,`AWS::Connect::PhoneNumber`实例一直无法成功部署,显示以下消息。

资源处理程序返回消息: "类型为 'AWS::Connect::PhoneNumber'、标识符为 'ARN_REDACTED' 的资源未稳定。" (请求令牌: 77acda15-2de4-3152-ff11-0e972d1840d1, 处理程序错误代码: 未稳定)


有人能帮忙解决吗?

我尝试了多次部署,但每次都得到相同的结果。我还尝试在另一个手动创建的实例上手动申请电话号码,但是收到一个错误,说我已经达到配额,尽管我从未成功申请过任何号码。
英文:

I am trying to deploy a CloudFormation stack with this template.

---

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

However, the AWS::Connect::PhoneNumber instance keeps failing to deploy with the following message.

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)

Can anyone help with this?

I tried deploying multiple times but still got the same result every time. I also tried claiming a phone number manually on another instance that I created by hand, but I got an error saying I had reached the quota, even though I've never successfully claimed any numbers.

答案1

得分: 1

这是一个需要与亚马逊支持创建工单来解决的问题。

独立的错误消息没有解释您是如何到达当前情况的,因此下面我记录了重新创建问题的步骤。

简要介绍:

我从一个全新的AWS账户开始,并使用根用户进行部署。我这样做是为了确保账户中没有冲突或之前创建的实例,因为根用户具有完全的权限(请注意,我了解在生产环境中不建议使用根用户)。

重现步骤:

  1. 使用CFN创建实例(MyFirstInstance)-(成功)
  2. 使用CFN获取电话号码(成功)
  3. 尝试在控制台中获取新的电话号码(已达到限制错误)(请参阅下面的限额错误信息)
  4. 检查服务限额 - Amazon Connect
  5. 检查服务限额 - 列出电话号码(只获取一个电话号码)
  6. 删除 - 获取的电话号码CFN堆栈
  7. 检查服务限额 - 列出电话号码(列表现在为空)
  8. 删除 - 实例CFN堆栈
  9. 使用CFN重新创建实例(MyFirstInstance)-(成功)
  10. 使用CFN重新获取电话号码(失败,出现未稳定错误)
  11. 尝试在控制台中获取新的电话号码(已达到限制错误)
  12. 使用CFN重新创建实例(新的逻辑ID为MySecondInstance)-(成功)
  13. 使用CFN重新获取电话号码(新的逻辑ID - MySecondPhoneNumber)-(失败,出现未稳定错误)

总结: 最初的部署将按预期工作。实例已创建并获取了电话号码。然而,一旦在账户中创建了一个实例并获取了电话号码,那就是在获取电话号码时出现这个未稳定错误的时候。我确信这不是预期的行为,但这是目前的经验,需要进行支持。使用新的逻辑ID和/或资源名称并不能帮助解决问题。

此外,根据Amazon Connect的管理员指南中的“Amazon Connect服务限额”部分,即使是首次获取电话号码,控制台可能会显示电话号码限额已达到的消息,并且也需要支持干预。请参考下面的Amazon Connect专家意见。

我多次尝试部署,但每次都得到相同的结果。我还尝试手动在我手动创建的另一个实例上获取电话号码,但出现错误,说我已经达到了限额,尽管我从未成功获取过任何号码。

摘录解释(每个实例的电话号码):

即使是第一次获取电话号码,也可能会出现错误消息:“您已达到电话号码限额”。所有引起此错误消息的问题都需要AWS支持来解决。

摘录来源 在此处查找答案的网址

最后,您可以在我的GitHub上找到与云模板文件和补充截图相关的内容

英文:

This is an issue that will require a support ticket with Amazon.

The stand alone error message didn't explain how you may have gotten to where you are, so below I documented steps I took to recreate the issue.

Primer:

I started with a new clean AWS account and using the root user to deploy. I did this to ensure there wasn't already a conflict in the account or a previous instance created and because the root user has full privs (please note I understand working with the root user isn't best practice and do not advise this in a production setting).

Steps to Recreate:

  1. Created Instance using CFN (MyFirstInstance) - (success)
  2. Claimed Phone number using CFN (success)
  3. Tried to Claim new Phone Number in Console (Limit Reached Error) (see quota reached error info below)
  4. Checked Service Quota - Amazon Connect
  5. Checked Service Quota - List Phone Numbers (Only one phone number claimed)
  6. Deleted - Claimed Phone number CFN stack
  7. Checked Service Quota - List Phone Numbers (List is now empty)
  8. Deleted - Instance CFN Stack
  9. ReCreated Instance using CFN (MyFirstInstance) - (success)
  10. ReClaimed a Phone number using CFN (failed with did not stabilize error)
  11. Tried to Claim new Phone Number in Console (Limit Reached Error)
  12. ReCreated Instance using CFN (new logical id MySecondInstance) (success)
  13. ReClaimed a Phone number using CFN (new logical id - MySecondPhoneNumber) - (failed with did not stabilize error)

Take Away: The initial deployment will work as intended. The instance was created and the phone number claimed. However, once an instance is created in the account and a phone number is claimed, that's when this stabilize error during the claiming of a phone number seems to surface. I'm sure this isn't the intended behavior but, it's what is being experienced and will require support. Using new logical id's and/or resource names do not help.

Additionally, (according to Amazon Connect's Administrator Guide in the "Amazon Connect service quotas" section) the Phone Number limit reached message may appear in the console even if it's the first time claiming a number and will require support intervention as well. See below expert from amazon.

> I tried deploying multiple times but still got the same result every
> time. I also tried claiming a phone number manually on another
> instance that I created by hand, but I got an error saying I had
> reached the quota, even though I've never successfully claimed any
> numbers.

Excerpt explaining (Phone numbers per instance):

> It's possible to get an error message that "You've reached the limit
> of Phone Numbers," even if it's the first time you've claimed a phone
> number. All the issues that cause this error message require help from
> AWS Support to resolve.

Excerpt Source here is the url of to find the answer:

Lastly, you can find at my github related cloudformation files and supplemental screenshots

huangapple
  • 本文由 发表于 2023年2月9日 01:34:48
  • 转载请务必保留本文链接:https://go.coder-hub.com/75389664.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定