Skip to content

Instantly share code, notes, and snippets.

@spenserpothier
Last active August 16, 2017 20:26
Show Gist options
  • Save spenserpothier/2e95ff5186a5ff53ad62 to your computer and use it in GitHub Desktop.
Save spenserpothier/2e95ff5186a5ff53ad62 to your computer and use it in GitHub Desktop.
some python snippet for finding instance ids in events
instances = [x['resourceId'] for x in event['requestParameters']['resourcesSet']['items']
if re.search('i-([0-9]|[a-f]){8}', x['resourceId'])]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment