Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
export aggregator="REPLACE_WITH_YOUR_AGGREGATOR_NAME"
export query="SELECT accountId, configuration.instancdId, configuration.publicIp, configuration.ipv6Addresses WHERE resourceType = 'AWS::EC2::Instance' AND (configuration.publicIp BETWEEN '0.0.0.0' AND '255.255.255.255' OR configuration.ipv6Addresses BETWEEN '0:0:0:0:0:0:0:0' AND 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff')"
aws configservice select-aggregate-resource-config --expression $query --configuration-aggregator-name $aggregator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment