code: def validate_account(self):
          
          self._validating = True
          with self.catch_invalid_credentials():
              log.info("Finding a role to check the account id")
              a_role = list(self.iam.resource.roles.limit(1))
              if not a_role:
                  raise AwsSyncrError("Couldn't find an iam role, can't validate the account....")
              account_id = a_role[0].meta.data['Arn'].split(":", 5)[4]
  
          chosen_account = self.accounts[self.environment]
          if chosen_account != account_id:
              raise BadCredentials("Don't have credentials for the correct account!", wanted=chosen_account, got=account_id)
  
          self._validating = False
          self._validated = True
docs: Make sure we are able to connect to the right account