Hi all,
Tricky one here, but seems possible.
I am attempting to create an AWS EC2 inventory csv file across our AWS Organization.
Requirements are to include the EC2 Instance Name and the ENI Network Interface Id's.
Using the AWS Config Query editor appears to be the fastest method in a multi-account Organization.
Here is my query so far:
SELECT
resourceId,
resourceName,
resourceType,
accountId,
configuration.instanceType,
configuration.state.name,
tags,
configuration.networkInterfaces,
configuration.publicIp,
configuration.privateIpAddress
WHERE
resourceType = 'AWS::EC2::Instance'
AND configuration.state.name = 'running'
Questions:
- How can I get the tags.key "Name" property to display in the output?
- How can I get the configuration.networkInterfaces "networkInterfaceId" property to display in the output?
Screenshot attached for reference illustrating the problem.
Here is a link for reference.
https://www.virtualbonzo.com/2022/08/08/a-quick-and-easy-ec2-inventory-using-aws-config/