This repository has been archived on 2023-04-11. You can view files and clone it, but cannot push or open issues or pull requests.
defend-together/infrastructure/cloudformation/dt/cloudwatch.yaml
2020-05-14 05:39:02 -04:00

41 lines
948 B
YAML

AWSTemplateFormatVersion: "2010-09-09"
Description: DT CloudWatch stack
Parameters:
#------------------------
# Deployment Information
#------------------------
environment:
Type: String
Description: Name of the environment
Default: production
#----------------
# ECS Information
#----------------
Cluster:
Description: The ECS cluster to watch
Type: String
#-------------------
# Lambda Information
#-------------------
LambdaArn:
Description: Lambda function to call upon ecs task state change
Type: String
Resources:
TaskListRule:
Type: AWS::Events::Rule
Properties:
EventPattern:
source:
- "aws.ecs"
detail-type:
- "ECS Task State Change"
detail:
clusterArn:
- !Ref Cluster
Targets:
- Id: RedisUpdater
Arn: !Ref LambdaArn