-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathtemplate.yml
54 lines (49 loc) · 1.52 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Metadata:
AWS::ServerlessRepo::Application:
Name: lambda-to-slack
Description: Posts messages to a Slack channel.
Author: Keeton Hodgson
SpdxLicenseId: MIT
# paths are relative to .aws-sam/build directory
LicenseUrl: ../../LICENSE
ReadmeUrl: ../../README.md
Labels: [serverless,slack,lambda]
HomePageUrl: https://github.com/keetonian/lambda-to-slack
# Update the semantic version and run sam publish to publish a new version of your app
SemanticVersion: 0.0.1
# best practice is to use git tags for each release and link to the version tag as your source code URL
SourceCodeUrl: https://github.com/keetonian/lambda-to-slack/tree/0.0.1
Parameters:
LogLevel:
Type: String
Description: Log level for Lambda function logging, e.g., ERROR, INFO, DEBUG, etc
Default: INFO
SlackUrl:
Description: Webhook URL for integration with Slack
Type: String
Globals:
Function:
Runtime: python3.7
Tracing: Active
Timeout: 60
Environment:
Variables:
LOG_LEVEL: !Ref LogLevel
Resources:
LambdaToSlack:
Type: AWS::Serverless::Function
Properties:
CodeUri: src/
Handler: handlers.post_to_slack
Environment:
Variables:
SLACK_URL: !Ref SlackUrl
Outputs:
LambdaToSlackName:
Description: "Lambda Function Name"
Value: !Ref LambdaToSlack
LambdaToSlackArn:
Description: "Lambda Function ARN"
Value: !GetAtt LambdaToSlack.Arn