add user
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
AWSTemplateFormatVersion: "2010-09-09"
|
||||
Transform: "AWS::Serverless-2016-10-31"
|
||||
AWSTemplateFormatVersion: '2010-09-09'
|
||||
Transform: 'AWS::Serverless-2016-10-31'
|
||||
|
||||
Parameters:
|
||||
UserTable:
|
||||
@@ -46,11 +46,16 @@ Resources:
|
||||
Properties:
|
||||
RetentionInDays: 90
|
||||
|
||||
ScheduleLog:
|
||||
Type: AWS::Logs::LogGroup
|
||||
Properties:
|
||||
RetentionInDays: 7
|
||||
|
||||
HttpApi:
|
||||
Type: AWS::Serverless::HttpApi
|
||||
Properties:
|
||||
CorsConfiguration:
|
||||
AllowOrigins: ["*"]
|
||||
AllowOrigins: ['*']
|
||||
AllowMethods: [GET, POST, PUT, DELETE, PATCH, OPTIONS]
|
||||
AllowHeaders: [Content-Type, X-Requested-With, Authorization]
|
||||
AllowCredentials: false
|
||||
@@ -59,13 +64,13 @@ Resources:
|
||||
DefaultAuthorizer: OAuth2Authorizer
|
||||
Authorizers:
|
||||
OAuth2Authorizer:
|
||||
IdentitySource: "$request.header.Authorization"
|
||||
IdentitySource: '$request.header.Authorization'
|
||||
JwtConfiguration:
|
||||
issuer: "https://id.saladeaula.digital"
|
||||
issuer: 'https://id.saladeaula.digital'
|
||||
audience:
|
||||
- "1a5483ab-4521-4702-9115-5857ac676851"
|
||||
- "1db63660-063d-4280-b2ea-388aca4a9459"
|
||||
- "78a0819e-1f9b-4da1-b05f-40ec0eaed0c8"
|
||||
- '1a5483ab-4521-4702-9115-5857ac676851'
|
||||
- '1db63660-063d-4280-b2ea-388aca4a9459'
|
||||
- '78a0819e-1f9b-4da1-b05f-40ec0eaed0c8'
|
||||
|
||||
HttpApiFunction:
|
||||
Type: AWS::Serverless::Function
|
||||
@@ -97,12 +102,33 @@ Resources:
|
||||
Path: /{proxy+}
|
||||
Method: ANY
|
||||
ApiId: !Ref HttpApi
|
||||
Health:
|
||||
Type: HttpApi
|
||||
Properties:
|
||||
Path: /health
|
||||
Method: GET
|
||||
ApiId: !Ref HttpApi
|
||||
Auth:
|
||||
Authorizer: NONE
|
||||
|
||||
EventKeepWarmScheduledFunction:
|
||||
Type: AWS::Serverless::Function
|
||||
Properties:
|
||||
Handler: keep_warm.lambda_handler
|
||||
LoggingConfig:
|
||||
LogGroup: !Ref ScheduleLog
|
||||
Events:
|
||||
ScheduleEvent:
|
||||
Type: ScheduleV2
|
||||
Properties:
|
||||
ScheduleExpression: 'cron(*/3 5-23 * * ? *)'
|
||||
ScheduleExpressionTimezone: America/Sao_Paulo
|
||||
|
||||
Outputs:
|
||||
HttpApiUrl:
|
||||
Description: URL of your API endpoint
|
||||
Value:
|
||||
Fn::Sub: "https://${HttpApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}"
|
||||
Fn::Sub: 'https://${HttpApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}'
|
||||
HttpApiId:
|
||||
Description: Api ID of HttpApi
|
||||
Value:
|
||||
|
||||
Reference in New Issue
Block a user