How to set up cloud custodian on Docker

雨燕双飞 提交于 2020-02-08 02:30:08

问题


All,

I am trying to implement cloud custodian solution on AWS ECS scheduled task on Fargate.

My Dockerfile looks like:

FROM cloudcustodian/c7n:latest

WORKDIR /opt/src

COPY policy.yml policy.yml
COPY mailer.yml mailer.yml

ENTRYPOINT [ "/bin/sh" ]

where policy.yml looks like

policies:
  - name: c7n-mailer-test
    resource: sqs
    filters:
     - "tag:MailerTest": absent
    actions:
      - type: notify
        template: default
        priority_header: '2'
        subject: testing the c7n mailer
        to:
          - test@mydomain.com
        transport:
          type: sqs
          queue: arn:aws:iam::xxxx:role/cloud-custodian-mailer-role-svc

Also mailer.yml looks like

queue_url: https://sqs.ap-southeast-1.amazonaws.com/xvxvxvx9/cloud-custodian
role: arn:aws:iam::xxxxx:role/cloud-custodian-mailer-role
from_address: test@mydomain.in

After running the image I cannot see any message on the SQS or in the recipient's email.

Also, how can I store the output on s3 also.

来源:https://stackoverflow.com/questions/60104043/how-to-set-up-cloud-custodian-on-docker

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!