{"action":"created","issue":{"url":"https://api.github.com/repos/capitalone/cloud-custodian/issues/970","repository_url":"https://api.github.com/repos/capitalone/cloud-custodian","labels_url":"https://api.github.com/repos/capitalone/cloud-custodian/issues/970/labels{/name}","comments_url":"https://api.github.com/repos/capitalone/cloud-custodian/issues/970/comments","events_url":"https://api.github.com/repos/capitalone/cloud-custodian/issues/970/events","html_url":"https://github.com/capitalone/cloud-custodian/issues/970","id":209309024,"number":970,"title":"Spot Instance Filter","user":{"login":"fathre2","id":25036588,"avatar_url":"https://avatars.githubusercontent.com/u/25036588?v=3","gravatar_id":"","url":"https://api.github.com/users/fathre2","html_url":"https://github.com/fathre2","followers_url":"https://api.github.com/users/fathre2/followers","following_url":"https://api.github.com/users/fathre2/following{/other_user}","gists_url":"https://api.github.com/users/fathre2/gists{/gist_id}","starred_url":"https://api.github.com/users/fathre2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fathre2/subscriptions","organizations_url":"https://api.github.com/users/fathre2/orgs","repos_url":"https://api.github.com/users/fathre2/repos","events_url":"https://api.github.com/users/fathre2/events{/privacy}","received_events_url":"https://api.github.com/users/fathre2/received_events","type":"User","site_admin":false},"labels":[{"id":390680437,"url":"https://api.github.com/repos/capitalone/cloud-custodian/labels/area/actions","name":"area/actions","color":"d93f0b","default":false},{"id":390676353,"url":"https://api.github.com/repos/capitalone/cloud-custodian/labels/kind/question","name":"kind/question","color":"0052cc","default":false},{"id":370927520,"url":"https://api.github.com/repos/capitalone/cloud-custodian/labels/resource/ec2","name":"resource/ec2","color":"fbca04","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2017-02-21T23:48:23Z","updated_at":"2017-02-23T17:38:51Z","closed_at":"2017-02-23T17:38:50Z","body":"There doesn't seem to be support for the spot instance lifecycle filter.  Looking to have a policy for EC2 (normal/scheduled) and a termination policy for spot instances.    The main issue here is that any EC2 filter policy to stop instances will fail since Spot Instances cannot stop only terminate.   Would like to have two separate policies terminate for spot and stop for EC2 but need a means to filter on lifecycle.  \r\n\r\n\r\nec2:\r\n  actions: [auto-tag-user, invoke-lambda, mark, mark-for-op, modify-security-groups,\r\n    normalize-tag, notify, remove-tag, rename-tag, resize, snapshot, start, stop,\r\n    tag, tag-trim, terminate, unmark, untag]\r\n  filters: [and, default-vpc, ebs, ephemeral, event, image, image-age, instance-age,\r\n    instance-uptime, marked-for-op, metrics, offhour, onhour, or, security-group,\r\n    state-age, subnet, tag-count, value]\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/capitalone/cloud-custodian/issues/comments/282064289","html_url":"https://github.com/capitalone/cloud-custodian/issues/970#issuecomment-282064289","issue_url":"https://api.github.com/repos/capitalone/cloud-custodian/issues/970","id":282064289,"user":{"login":"fathre2","id":25036588,"avatar_url":"https://avatars.githubusercontent.com/u/25036588?v=3","gravatar_id":"","url":"https://api.github.com/users/fathre2","html_url":"https://github.com/fathre2","followers_url":"https://api.github.com/users/fathre2/followers","following_url":"https://api.github.com/users/fathre2/following{/other_user}","gists_url":"https://api.github.com/users/fathre2/gists{/gist_id}","starred_url":"https://api.github.com/users/fathre2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fathre2/subscriptions","organizations_url":"https://api.github.com/users/fathre2/orgs","repos_url":"https://api.github.com/users/fathre2/repos","events_url":"https://api.github.com/users/fathre2/events{/privacy}","received_events_url":"https://api.github.com/users/fathre2/received_events","type":"User","site_admin":false},"created_at":"2017-02-23T17:38:50Z","updated_at":"2017-02-23T17:38:50Z","body":"Btw... we got this to work....problem solved. \r\n\r\n- \"InstanceLifecycle\": spot"}}
{"actor":{"display_login":"fathre2"}}