Fork me on GitHub
Drew Verlee02:07:08

Does anyone know of a wider aws community to ask questions in? I'm trying reddit and it's been hit or mis. I don't want to flood the channel here either. (he says as he asks another question 😕 ) In a with a ec2 (fargate) what resource i'm i supposed to point at for the ARN? In the rule docs we get this example which might be informative

  Type: AWS::Events::Rule
    Description: Events Rule with EcsParameters
        - aws.ec2
        - EC2 Instance State-change Notification
          - stopping
    ScheduleExpression: rate(15 minutes)
    State: DISABLED
      - Arn: !GetAtt 
          - MyCluster #<------- I assume this means i'm supposed to point at the 'AWS::ECS::Cluster' that has the 'AWS::ECS::Service' that has the 'task defination i reference below?'. 
          - Arn 
        RoleArn: !GetAtt 
          - ECSTaskRole
          - Arn
        Id: Id345
          TaskCount: 1
          TaskDefinitionArn: !Ref MyECSTask
If my comment (# <--) midway in the cf is correct, then why does the Events::Rule need both the cluster and the task definition referenced? What does providing the ARN do? The for the arn just say: "The Amazon Resource Name (ARN) of the target." I feel like this kind of thing should be obvious, maybe is obvious to someone that has been around a bit, but i fee like i just circled the internet and came up short.

Drew Verlee03:07:17

stackoverflow is probably one place for this kind of thing.

Drew Verlee03:07:50

here is a from 2019 (basically the stone age) and a recent Yea, they also target the cluster. I guess i'll just turn off my brain and accept that it has to be the cluster without any clue why.

Drew Verlee03:07:45

maybe all the cool kids use event bridge instead of directly to the service. I have no idea why that would be useful in my case but maybe it's better described.

Leaf Garland06:07:37

The AWS docs page you posted says that this page lists the resources that can be targets

Drew Verlee12:07:14

Yep. The church one in my case is the ecs task. Which means the arm should be the cluster of the task. Essentially the outer most layer. Can't find any docs on why. But it's ok, i just need to put it together. :)


What's wrong with asking here? The answers might be as a reference for others and in tge worst case nobody knows.