Skip to content

Commit

Permalink
remove plans for other slack integrations from this app
Browse files Browse the repository at this point in the history
  • Loading branch information
keetonian committed Jan 17, 2019
1 parent 0c2b704 commit 9a5e202
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 24 deletions.
5 changes: 0 additions & 5 deletions src/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@
LOG = lambdalogging.getLogger(__name__)


def interact_with_slack(event, context):
"""Lambda function handler."""
LOG.info('Received event: %s', event)


def logs_to_slack(event, context):
"""Lambda function handler."""
LOG.info('Received event: %s', event)
Expand Down
18 changes: 3 additions & 15 deletions template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,13 @@ Parameters:
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
LogGroupName:
Description: Log group to listen to (has to be in same account and region)
Type: String
FilterPattern:
Description: Pattern for filtering log events
Type: String
Default: ERROR

Expand Down Expand Up @@ -55,25 +58,10 @@ Resources:
FilterPattern: !Ref FilterPattern
LogGroupName: !Ref LogGroupName

SlackInteractive:
Type: AWS::Serverless::Function
Properties:
CodeUri: src/
Handler: handlers.interact_with_slack
Events:
InteractEvent:
Type: Api
Properties:
Path: /slack
Method: post

Outputs:
LogsToSlackName:
Description: "Lambda Function Name"
Value: !Ref LogsToSlack
LogsToSlackArn:
Description: "Lambda Function ARN"
Value: !GetAtt LogsToSlack.Arn
ApiURL:
Description: "API URL"
Value: !Sub 'https://${ServerlessRestApi}.execute-api.${AWS::Region}.amazonaws.com/Prod/'
4 changes: 0 additions & 4 deletions test/unit/test_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
import test_constants


def test_interact_with_slack(mocker):
handlers.interact_with_slack({}, None)


def test_logs_to_slack(mocker):
mocker.patch.object(slack, 'post_message')
handlers.logs_to_slack(test_constants.AWS_LOG_EVENT, None)
Expand Down

0 comments on commit 9a5e202

Please sign in to comment.