wip checkout
This commit is contained in:
@@ -39,6 +39,7 @@ Globals:
|
||||
ENROLLMENT_TABLE: !Ref EnrollmentTable
|
||||
COURSE_TABLE: !Ref CourseTable
|
||||
BUCKET_NAME: !Ref BucketName
|
||||
IUGU_API_TOKEN: '{{resolve:ssm:/saladeaula/iugu_api_token}}'
|
||||
|
||||
Resources:
|
||||
EventLog:
|
||||
@@ -46,6 +47,37 @@ Resources:
|
||||
Properties:
|
||||
RetentionInDays: 90
|
||||
|
||||
HttpLog:
|
||||
Type: AWS::Logs::LogGroup
|
||||
Properties:
|
||||
RetentionInDays: 90
|
||||
|
||||
HttpApi:
|
||||
Type: AWS::Serverless::HttpApi
|
||||
Properties:
|
||||
CorsConfiguration:
|
||||
AllowOrigins: ['*']
|
||||
AllowMethods: [POST, OPTIONS]
|
||||
AllowHeaders: [Content-Type, X-Requested-With]
|
||||
|
||||
HttpApiFunction:
|
||||
Type: AWS::Serverless::Function
|
||||
Properties:
|
||||
Handler: app.lambda_handler
|
||||
Timeout: 12
|
||||
LoggingConfig:
|
||||
LogGroup: !Ref HttpLog
|
||||
Policies:
|
||||
- DynamoDBWritePolicy:
|
||||
TableName: !Ref OrderTable
|
||||
Events:
|
||||
Post:
|
||||
Type: HttpApi
|
||||
Properties:
|
||||
Path: /
|
||||
Method: POST
|
||||
ApiId: !Ref HttpApi
|
||||
|
||||
EventBillingAppendEnrollmentFunction:
|
||||
Type: AWS::Serverless::Function
|
||||
Properties:
|
||||
@@ -286,3 +318,13 @@ Resources:
|
||||
new_image:
|
||||
sk: [generated_items]
|
||||
status: [SUCCESS]
|
||||
|
||||
Outputs:
|
||||
HttpApiUrl:
|
||||
Description: URL of your API endpoint
|
||||
Value:
|
||||
Fn::Sub: 'https://${HttpApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}'
|
||||
HttpApiId:
|
||||
Description: Api ID of HttpApi
|
||||
Value:
|
||||
Ref: HttpApi
|
||||
|
||||
Reference in New Issue
Block a user