从serverless.yml创建AWS Cognito用户池

问题描述 投票:0回答:2

我正在尝试使用AWS Cognito用户池进行用户身份验证,但我似乎无法弄清楚如何从serverless.yml文件创建一个。我知道要创建其他资源,您可以执行以下操作:

resources:
  Resources:
    Table:
      Type: "AWS::DynamoDB::Table"  # Change this to "AWS::Cognito::UserPool"?
      DeletionPolicy: Retain
      Properties:                   # Change the properties here, but to what?
        AttributeDefinitions:
          -
            AttributeName: id
            AttributeType: S
        KeySchema:
          -
            AttributeName: id
            KeyType: HASH
        ProvisionedThroughput:
          ReadCapacityUnits: 1
          WriteCapacityUnits: 1
        TableName: arn:aws:dynamodb:us-west-1:*:table/tablename

我假设我只需要将类型更改为"AWS:Cognito::UserPool"并更改属性。但是,我不知道要改变它的内容。

amazon-web-services amazon-cognito serverless-framework
2个回答

0
投票

对于那些寻找基本示例的人,请参阅@ionut的答案。 AWS::Cognito::UserPool的所有配置都可以找到here。至于AWS::Cognito::UserPoolClient,可以找到here

© www.soinside.com 2019 - 2024. All rights reserved.