This repository was archived by the owner on May 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlambda.yaml
More file actions
51 lines (47 loc) · 1.61 KB
/
lambda.yaml
File metadata and controls
51 lines (47 loc) · 1.61 KB
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
46
47
48
49
50
51
AWSTemplateFormatVersion: "2010-09-09"
Parameters:
AlexaSkillId:
Type: String
LambdaTag:
Type: String
Resources:
LambdaExecutionRole:
Type: "AWS::IAM::Role"
Properties:
AssumeRolePolicyDocument:
Version: "2012-10-17"
Statement:
- Effect: "Allow"
Principal:
Service: "lambda.amazonaws.com"
Action: "sts:AssumeRole"
Policies:
- PolicyName: "AlexaSkillCloudWatchLogsAccess"
PolicyDocument:
Version: "2012-10-17"
Statement:
- Effect: Allow
Action:
- logs:CreateLogGroup
- logs:CreateLogStream
- logs:PutLogEvents
Resource: !Sub "arn:aws:logs:${AWS::Region}:${AWS::AccountId}:*"
Lambda:
Type: "AWS::Lambda::Function"
Properties:
Environment:
Variables:
SKILL_ID: !Ref AlexaSkillId
Handler: handler.lambda_handler
Role: !GetAtt LambdaExecutionRole.Arn
Code:
S3Bucket: "bazwilliams.lambdas"
S3Key: !Sub "pollen-count-${LambdaTag}.zip"
Runtime: "python3.6"
Timeout: 10
AlexaSkillFunctionPermissions:
Type: "AWS::Lambda::Permission"
Properties:
FunctionName: !Ref Lambda
Action: lambda:InvokeFunction
Principal: alexa-appkit.amazon.com