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