From b25896d869e737ea83e7e859ab308a6bd2c5942a Mon Sep 17 00:00:00 2001 From: Lucas Belo Date: Mon, 7 Oct 2024 11:30:20 -0300 Subject: [PATCH] Cognito user pool --- services/tasks_api/resources/cognito.yml | 26 ++++++++++++++++++++++++ services/tasks_api/serverless.yml | 1 + 2 files changed, 27 insertions(+) create mode 100644 services/tasks_api/resources/cognito.yml diff --git a/services/tasks_api/resources/cognito.yml b/services/tasks_api/resources/cognito.yml new file mode 100644 index 0000000..aeff4fa --- /dev/null +++ b/services/tasks_api/resources/cognito.yml @@ -0,0 +1,26 @@ +Resources: + CognitoUserPool: + Type: AWS::Cognito::UserPool + Properties: + UserPoolName: ${self:provider.stage}-tasks-api-pool + AutoVerifiedAttributes: + - email + + CognitoUserPoolClient: + Type: AWS::Cognito::UserPoolClient + Properties: + ClientName: ${self:provider.stage}-tasks-api-client + UserPoolId: + Ref: CognitoUserPool + ExplicitAuthFlows: + - ADMIN_NO_SRP_AUTH + GenerateSecret: false + +Outputs: + UserPoolId: + Value: + Ref: CognitoUserPool + + UserPoolClientId: + Value: + Ref: CognitoUserPoolClient \ No newline at end of file diff --git a/services/tasks_api/serverless.yml b/services/tasks_api/serverless.yml index f7376c1..9e1bd67 100644 --- a/services/tasks_api/serverless.yml +++ b/services/tasks_api/serverless.yml @@ -57,4 +57,5 @@ plugins: - serverless-python-requirements resources: + - ${file(resources/cognito.yml)} - ${file(resources/dynamodb.yml)} \ No newline at end of file