This repository has been archived by the owner on Nov 1, 2023. It is now read-only.
forked from alexa-samples/skill-sample-python-fact
-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.yaml
73 lines (73 loc) · 2.37 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
Description: Create the function that processes requests from the Amazon Alexa service.
Parameters:
SkillDescription:
AllowedPattern: '[A-Za-z0-9-_ .,]+'
Default: Backend logic for the Interesting Black People Facts skill built using the ASK SDK for Python 3.6.
Type: String
Description: The description used for the AWS Lambda Function.
ConstraintDescription: The Skill Description must only contain letters, numbers, spaces, periods, commas, hyphens and underscores.
SkillFunctionName:
AllowedPattern: '[A-Za-z0-9-_]+'
Description: The name of the AWS Lambda Function. A unique number will be appended to the end of the skill name to avoid name collisions.
MaxLength: 50
Default: interesting-black-people-facts-skill
Type: String
ConstraintDescription: The Skill Function Name must only contain letters, numbers, hyphens and underscores.
AWSTemplateFormatVersion: '2010-09-09'
Outputs:
LambdaFunctionArn:
Description: Alexa Skill ARN
Value:
Fn::GetAtt:
- FactSkillSampleForAlexaSkillsKit
- Arn
Transform: AWS::Serverless-2016-10-31
Resources:
FactSkillSampleForAlexaSkillsKit:
Type: AWS::Serverless::Function
Properties:
Layers:
- arn:aws:lambda:us-east-1:173334852312:layer:ask-sdk-for-python-36:1
Description:
Fn::Join:
- ' '
- - Ref: SkillDescription
- 'Stack name:'
- Ref: AWS::StackName
MemorySize: 128
Handler: lambda_function.lambda_handler
Timeout: 8
CodeUri:
Bucket: blacklivesmatter-interesting-facts-skill
Key: blackivesmatter.zip
Runtime: python3.8
Events:
AlexaTrigger:
Type: AlexaSkill
FunctionName:
Fn::Join:
- '-'
- - Ref: SkillFunctionName
- Fn::Select:
- 4
- Fn::Split:
- '-'
- Fn::Select:
- 2
- Fn::Split:
- /
- Ref: AWS::StackId
Metadata:
Name: alexa-skills-kit-python36-fact
AWS::CloudFormation::Interface:
ParameterGroups:
- Parameters:
- SkillFunctionName
- SkillDescription
Label:
default: Lambda Function
ParameterLabels:
SkillDescription:
default: What should the function description be?
SkillFunctionName:
default: What should the function be named?