File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -113,6 +113,35 @@ Resources:
113113 Method : get
114114 RestApiId : !Ref OrderApi
115115
116+ GetOrderFunction :
117+ Type : AWS::Serverless::Function
118+ Properties :
119+ CodeUri : src/
120+ Handler : handlers/getOrder.handler
121+ Runtime : nodejs22.x
122+ MemorySize : 128
123+ Timeout : 10
124+ Policies :
125+ - DynamoDBCrudPolicy :
126+ TableName :
127+ !Ref DynamoDBOrdersTable
128+ - AWSLambdaVPCAccessExecutionRole
129+ - AmazonDynamoDBFullAccess
130+ - AWSLambdaSQSQueueExecutionRole
131+ - AWSLambdaBasicExecutionRole
132+ - AWSSecretsManagerGetSecretValuePolicy :
133+ SecretArn : !Sub "arn:aws:secretsmanager:${AWS::Region}:${AWS::AccountId}:secret:mongodb/credentials-*"
134+ Environment :
135+ Variables :
136+ HOSTING_ENV : !Ref HOSTINGENV
137+ Events :
138+ ApiEvent :
139+ Type : Api
140+ Properties :
141+ Path : /orders/{id}
142+ Method : get
143+ RestApiId : !Ref OrderApi
144+
116145Outputs :
117146 # ServerlessRestApi is an implicit API created out of Events key under Serverless::Function
118147 # Find out more about other implicit resources you can reference within SAM
You can’t perform that action at this time.
0 commit comments