title: How to fetch all aws resources in all regions in lambda function, with boto3 lib
body: <p>I am tring to log all my aws resources in all regions, (with multiple accounts) using boto3 lib.</p>
  
  <p>I found that aws config is helpful.</p>
  
  <p>I have already created aggregator</p>
  
  <pre><code>  ConfigurationAggregator:
      Type: 'AWS::Config::ConfigurationAggregator'
      Properties:
        AccountAggregationSources:
          - AccountIds: !Ref AccountIds
            AllAwsRegions: !Ref AllAwsRegions
        ConfigurationAggregatorName: MyAggregator
  </code></pre>
  
  <p>And i went through boto3 lib docs for aws config
  <a href="https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/config.html#ConfigService.Client.batch_get_aggregate_resource_config" rel="nofollow noreferrer">https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/config.html#ConfigService.Client.batch_get_aggregate_resource_config</a></p>
  
  <p>But it requires various REQUIRED parameters like resourceid , region account id, resource type.</p>
  
  <p>Which is the simplest boto3 API where i don't have to pass anything except Aggregator name, and in return i get list of all and everykind kind of aws resources, in all the regions.</p>
  
  <p>I am not worried about whether resource is complianced or not, i just want to log each and every resource in one go.</p>