From 80f0034acac537628446d6d13ed46b951aea7f70 Mon Sep 17 00:00:00 2001 From: Facundo De Lorenzo Date: Mon, 20 May 2024 12:12:34 -0300 Subject: [PATCH] fix aws template-2 --- packages/api/src/types.ts | 1 + packages/api/template.yaml | 15 +++++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/packages/api/src/types.ts b/packages/api/src/types.ts index 0cd6f36..265e31c 100644 --- a/packages/api/src/types.ts +++ b/packages/api/src/types.ts @@ -7,6 +7,7 @@ export interface FinishOrderRequest { orderId: string; restaurantId: number; } + export interface OrderProduct { product: ProductDTO; amount: number; diff --git a/packages/api/template.yaml b/packages/api/template.yaml index a3c75bc..5859ae4 100644 --- a/packages/api/template.yaml +++ b/packages/api/template.yaml @@ -10,13 +10,16 @@ Resources: ExecutionRole: Type: AWS::IAM::Role Properties: - AssumeRolePolicyDocument: Json + AssumeRolePolicyDocument: + Version: '2012-10-17' + Statement: + - Effect: Allow + Principal: + Service: 'lambda.amazonaws.com' + Action: 'sts:AssumeRole' + ManagedPolicyArns: + -arn:aws:iam::aws:policy/DynamoDBCrudPolicy RoleName: APIExecutionRole - Policies: - - DynamoDBCrudPolicy: - TableName: wakeup-challenge-orders - - DynamoDBCrudPolicy: - TableName: wakeup-challenge-products MyApi: Type: AWS::Serverless::Api