wip checkout

This commit is contained in:
2026-01-09 11:20:56 -03:00
parent e29e81b253
commit 823134f450
18 changed files with 290 additions and 80 deletions

View File

@@ -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