We are very impressed with the capability and flexibility of cloud-custodian.
Right now, I'm just trying to get started. I thought a good first policy would be to list running EC2 instances, but haven't been successful:
test.yml
policies:
- name: list-running-ec2
resource: ec2
filters:
- "instance-state-name": running
[ec2-user@ip-10-97-13-39]$ custodian run test.yml -s . --dryrun -v
2017-03-21 14:10:18,186: custodian.cli:DEBUG using default region:us-east-1 from boto
2017-03-21 14:10:18,253: custodian.commands:DEBUG Loaded file test.yml. Contains 1 policies (after filtering)
2017-03-21 14:10:18,254: custodian.output:DEBUG Storing output with <DirectoryOutput to dir:./list-running-ec2>
2017-03-21 14:10:18,254: custodian.policy:INFO Running policy list-running-ec2 resource: ec2 region:us-east-1 c7n:0.8.23.2
Is it normal for the process to hang here? It doesn't seem to return so I exit with Cntr-C.
[ec2-user@ip-10-97-13-39]$ cat list-running-ec2/custodian-run.log
2017-03-21 14:10:18,254 - custodian.policy - INFO - Running policy list-running-ec2 resource: ec2 region:us-east-1 c7n:0.8.23.2
Do I need to specify an action to list the ec2 instance names? The documentation seems to suggest that the --dryrun flag will list AWS Resources.