-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.yml
39 lines (37 loc) · 1.21 KB
/
template.yml
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
AWSTemplateFormatVersion: "2010-09-09"
Transform: AWS::Serverless-2016-10-31
Description: Hue API Lambda function template
Resources:
HueLightingFunctionRole:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument:
Version: "2012-10-17"
Statement:
- Effect: Allow
Principal:
Service: lambda.amazonaws.com
Action: sts:AssumeRole
Policies:
- PolicyName: HueLightingPolicy
PolicyDocument:
Version: "2012-10-17"
Statement:
- Effect: Allow
Action:
- secretsmanager:GetSecretValue
- logs:CreateLogGroup
- logs:CreateLogStream
- logs:PutLogEvents
Resource:
- "arn:aws:secretsmanager:us-east-1:975049905873:secret:hue-api/username"
- "arn:aws:secretsmanager:us-east-1:975049905873:secret:hue-api/bridge-ip"
HueLightingFunction:
Type: AWS::Serverless::Function
Properties:
Handler: lambda_function.lambda_handler
Runtime: python3.12
Role: !GetAtt HueLightingFunctionRole.Arn
CodeUri: .
MemorySize: 128
Timeout: 3