Skip to content

Commit

Permalink
fix aws template-4
Browse files Browse the repository at this point in the history
  • Loading branch information
Facundo De Lorenzo committed May 20, 2024
1 parent 0728de9 commit c45a474
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@ jobs:
- name: SAM Deploy
working-directory: ./packages/api
run:
yes | sam deploy --stack-name wakeup-fullstack-challenge-api --capabilities CAPABILITY_IAM
yes | sam deploy --stack-name wakeup-fullstack-challenge-api --capabilities CAPABILITY_IAM CAPABILITY_NAMED_IAM

16 changes: 8 additions & 8 deletions packages/api/template.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AWSTemplateFormatVersion: "2010-09-09"
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: Api

Expand All @@ -9,18 +9,18 @@ Globals:
Resources:
ExecutionRole:
Type: AWS::IAM::Role
Properties:
Properties:
RoleName: APIExecutionRole
AssumeRolePolicyDocument:
Version: '2012-10-17'
Version: '2012-10-17'
Statement:
- Effect: Allow
Principal:
Service: 'lambda.amazonaws.com'
Action: 'sts:AssumeRole'
ManagedPolicyArns:
-arn:aws:iam::aws:policy/DynamoDBCrudPolicy
RoleName: APIExecutionRole

Roles:
- DynamoDBCrudPolicy

MyApi:
Type: AWS::Serverless::Api
Properties:
Expand Down Expand Up @@ -94,7 +94,7 @@ Resources:
Method: GET
Path: /orders
RestApiId: !Ref MyApi

GetRestaurantsFunction:
Type: AWS::Serverless::Function
Properties:
Expand Down

0 comments on commit c45a474

Please sign in to comment.