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