-
Notifications
You must be signed in to change notification settings - Fork 4
/
template.yaml
45 lines (41 loc) · 1.31 KB
/
template.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: >
Rastreador de Sangue API
Sample SAM Template for RastreadorSangueAPI
Globals:
Function:
Timeout: 10
MemorySize: 128
Resources:
HospitalRecordsFunction:
Type: AWS::Serverless::Function
Properties:
CodeUri: api/last_hospital_records
Handler: app.lambda_handler
Runtime: python3.9
Policies:
- DynamoDBReadPolicy:
TableName: hospitals_blood_status
Architectures:
- x86_64
Events:
LastHospitalRecordsApi:
Type: Api
Properties:
Path: /v1/hospitals/records
Method: get
HospitalCrawlers:
Type: AWS::CloudFormation::Stack
Properties:
TemplateURL: ./hospitals/hospital_lambdas.yaml
Outputs:
HospitalsRecordsApi:
Description: "API Gateway endpoint URL for Prod stage for HospitalRecords function"
Value: !Sub "https://${ServerlessRestApi}.execute-api.${AWS::Region}.amazonaws.com/v1/hospitals/records/"
HospitalRecordsFunction:
Description: "HospitalRecords Lambda Function ARN"
Value: !GetAtt HospitalRecordsFunction.Arn
HospitalRecordsFunctionIamRole:
Description: "Implicit IAM Role created for HospitalRecords function"
Value: !GetAtt HospitalRecordsFunctionRole.Arn