AWS Config is a service that can record the configuration of all your resources in AWS. It can deliver configuration "snapshots" on a regular schedule to an S3 bucket to allow you to do further analysis. This naturally pairs well with AWS Athena, a service that allows you to perform ad hoc SQL queries on files stored in S3. Athena can query arbitrary JSON, so it should have no problem with files generated by AWS Config, right? In fact, the AWS blog even has an article: How to query your AWS resource configuration states using AWS Config and Amazon Athena.