Amazon web services 如何使用CloudFormation添加用户池的资源服务器?

Amazon web services 如何使用CloudFormation添加用户池的资源服务器?,amazon-web-services,amazon-cloudformation,amazon-cognito,Amazon Web Services,Amazon Cloudformation,Amazon Cognito,使用CloudFormation,如何在AWS Cognito中为用户池创建资源服务器 在CloudFormation文档中,Cognito下只有5项,我看不出如何配置ResourceServer,这可能吗 谢谢。除其他项目外,CloudFormation不支持资源服务器。这是一份清单 作为CloudFormation的替代方案,您可以使用。使用SDK,您可以在CloudFormation中创建一个。然后,您可以将资源服务器作为自定义资源添加到CloudFormation中 您可以使用通用自定义

使用CloudFormation,如何在AWS Cognito中为用户池创建资源服务器

在CloudFormation文档中,Cognito下只有5项,我看不出如何配置ResourceServer,这可能吗


谢谢。

除其他项目外,CloudFormation不支持资源服务器。这是一份清单

作为CloudFormation的替代方案,您可以使用。使用SDK,您可以在CloudFormation中创建一个。然后,您可以将资源服务器作为自定义资源添加到CloudFormation中

您可以使用通用自定义资源提供程序

像这样使用它(未经测试,但应能正常工作):

API


现在可以使用
AWS::Cognito::UserPoolResourceServer
资源类型直接在cloudformation上实现。创建资源服务器不需要创建自定义资源。现在它得到了云层形成的支持。看见
我试图将我的自定义资源更新为cloudformation资源,但由于某些原因,资源服务器不可更新。因此,首先我必须删除一个变更集中的自定义资源,并重新创建为
AWS::Cognito::UserPoolResourceServer

恐怕不可能。我也找不到任何东西。我建议创建一张支持票,并提出要求,以防他们的路线图上还没有。
  ResourceServer:
    Type: 'Custom::CognitoResourceServer'
    Properties:
      ServiceToken: !Sub '${CustomResourceLambdaArn}'
      AgentService: cognito-idp
      AgentType: client
      AgentCreateMethod: create_resource_server
      AgentUpdateMethod: update_resource_server
      AgentDeleteMethod: delete_resource_server
      AgentResourceId: Name
      AgentCreateArgs:
        UserPoolId: !Sub '${UserPool}'
        Name: 'my-resource-server'
        Identifier: 'https://foo.bar'
        Scopes:
        - ScopeName: 'my-scope'
        - ScopeDescription: 'My scope.'
      AgentUpdateArgs:
        UserPoolId: !Sub '${UserPool}'
        Name: 'my-resource-server'
        Identifier: 'https://foo.bar'
        Scopes:
        - ScopeName: 'my-scope'
        - ScopeDescription: 'My scope.'
      AgentDeleteArgs:
        Identifier: 'https://foo.bar'