问题
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