-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.yaml
43 lines (39 loc) · 1.07 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
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: SAM app with Lambda function and function URL
Globals:
Function:
Timeout: 300
Runtime: python3.11
Resources:
GmailAccessFunction:
Type: AWS::Serverless::Function
Properties:
CodeUri: gmail_access/
Handler: app.lambda_handler
Layers:
- !Ref DependenciesLayer
Policies:
- Version: '2012-10-17'
Statement:
- Effect: Allow
Action:
- bedrock:InvokeModel
Resource: '*'
FunctionUrlConfig:
AuthType: NONE
DependenciesLayer:
Type: AWS::Serverless::LayerVersion
Properties:
LayerName: gmail-access-dependencies
Description: Dependencies for Gmail Access function
ContentUri: layer/
CompatibleRuntimes:
- python3.11
Metadata:
BuildMethod: python3.11
BuildArchitecture: x86_64
Outputs:
GmailAccessFunctionUrl:
Description: "Gmail Access Function URL"
Value: !GetAtt GmailAccessFunctionUrl.FunctionUrl