Skip to content

Commit

Permalink
fix aws template-2
Browse files Browse the repository at this point in the history
  • Loading branch information
Facundo De Lorenzo committed May 20, 2024
1 parent d4540af commit 80f0034
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
1 change: 1 addition & 0 deletions packages/api/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export interface FinishOrderRequest {
orderId: string;
restaurantId: number;
}

export interface OrderProduct {
product: ProductDTO;
amount: number;
Expand Down
15 changes: 9 additions & 6 deletions packages/api/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 80f0034

Please sign in to comment.