code: def convert_aws_args(aws_args):
      
      if not isinstance(aws_args, dict):
          raise errors.InvalidConfiguration(
              'Elastic DocManager config option "aws" must be a dict'
          )
      old_session_kwargs = dict(
          region="region_name",
          access_id="aws_access_key_id",
          secret_key="aws_secret_access_key",
      )
      new_kwargs = {}
      for arg in aws_args:
          if arg in old_session_kwargs:
              new_kwargs[old_session_kwargs[arg]] = aws_args[arg]
          else:
              new_kwargs[arg] = aws_args[arg]
      return new_kwargs
docs: Convert old style options into arguments to boto3.session.Session.