AWSTemplateFormatVersion: '2010-09-09' Description: Amazon Pinpoint Slack Channel. This application will deliver Amazon Pinpoint triggered messages to Slack using Slack API. Written in Python3. Transform: AWS::Serverless-2016-10-31 Parameters: BOTUSERTOKEN: Type: String Description: BOT_USER_TOKEN for Slack application # More info about Globals: https://github.com/awslabs/serverless-application-model/blob/master/docs/globals.rst Globals: Function: Timeout: 180 Metadata: AWS::ServerlessRepo::Application: Name: amazon-pinpoint-slack-channel Description: Amazon Pinpoint Slack Channel. This application will deliver Amazon Pinpoint triggered messages to Slack using Slack API. Written in Python3. Author: Amazon Pinpoint SpdxLicenseId: MIT-0 LicenseUrl: LICENSE ReadmeUrl: README.md Labels: ['amazon-pinpoint', 'pinpoint', 'custom-channel', 'slack', 'python'] HomePageUrl: https://aws.amazon.com/pinpoint SemanticVersion: 1.0.1 SourceCodeUrl: https://github.com/aws-samples/amazon-pinpoint-slack-channel Resources: AmazonPinpointSlackChannelFunction: Type: AWS::Serverless::Function Properties: FunctionName: AmazonPinpointSlackChannel CodeUri: pinpoint_slack_channel/ Handler: app.lambda_handler Runtime: python3.8 Environment: Variables: BOT_USER_TOKEN: Ref: BOTUSERTOKEN PinpointInvokePermission: Type: AWS::Lambda::Permission Properties: Action: lambda:InvokeFunction FunctionName: !Ref AmazonPinpointSlackChannelFunction Principal: !Sub pinpoint.${AWS::Region}.amazonaws.com SourceArn: !Sub arn:${AWS::Partition}:mobiletargeting:${AWS::Region}:${AWS::AccountId}:apps/* Outputs: AmazonPinpointSlackChannelFunction: Description: A function invoked by an Amazon Pinpoint Campaign or Journey that sends a message to a user through Slack Value: !GetAtt AmazonPinpointSlackChannelFunction.Arn