69 lines
1.8 KiB
YAML
69 lines
1.8 KiB
YAML
AWSTemplateFormatVersion: '2010-09-09'
|
|
Description: >-
|
|
AWS Cognito infrastructure for the IoT Dashboard project.
|
|
Creates a Cognito User Pool and a public App Client for a Vue SPA.
|
|
|
|
Resources:
|
|
IotDashboardUserPool:
|
|
Type: AWS::Cognito::UserPool
|
|
Properties:
|
|
UserPoolName: iot-dashboard-users
|
|
AutoVerifiedAttributes:
|
|
- email
|
|
UsernameAttributes:
|
|
- email
|
|
MfaConfiguration: OFF
|
|
Policies:
|
|
PasswordPolicy:
|
|
MinimumLength: 8
|
|
RequireUppercase: false
|
|
RequireNumbers: false
|
|
RequireSymbols: false
|
|
AdminCreateUserConfig:
|
|
AllowAdminCreateUserOnly: false
|
|
Tags:
|
|
- Key: Project
|
|
Value: iot-project
|
|
- Key: Component
|
|
Value: cognito
|
|
- Key: Environment
|
|
Value: dev
|
|
|
|
IotDashboardUserPoolClient:
|
|
Type: AWS::Cognito::UserPoolClient
|
|
Properties:
|
|
ClientName: iot-dashboard-vue
|
|
GenerateSecret: false
|
|
UserPoolId: !Ref IotDashboardUserPool
|
|
ExplicitAuthFlows:
|
|
- ALLOW_USER_PASSWORD_AUTH
|
|
- ALLOW_REFRESH_TOKEN_AUTH
|
|
- ALLOW_USER_SRP_AUTH
|
|
PreventUserExistenceErrors: ENABLED
|
|
Tags:
|
|
- Key: Project
|
|
Value: iot-project
|
|
- Key: Component
|
|
Value: cognito
|
|
- Key: Environment
|
|
Value: dev
|
|
|
|
Outputs:
|
|
UserPoolId:
|
|
Description: Cognito User Pool ID (iot-dashboard-users)
|
|
Value: !Ref IotDashboardUserPool
|
|
Export:
|
|
Name: !Sub "${AWS::StackName}-UserPoolId"
|
|
|
|
UserPoolClientId:
|
|
Description: Cognito User Pool App Client ID (iot-dashboard-vue)
|
|
Value: !Ref IotDashboardUserPoolClient
|
|
Export:
|
|
Name: !Sub "${AWS::StackName}-UserPoolClientId"
|
|
|
|
UserPoolArn:
|
|
Description: ARN of the Cognito User Pool
|
|
Value: !GetAtt IotDashboardUserPool.Arn
|
|
Export:
|
|
Name: !Sub "${AWS::StackName}-UserPoolArn"
|