def convert_aws_args(aws_args):
if not isinstance(aws_args, dict):<EOL><INDENT>raise errors.InvalidConfiguration(<EOL>'<STR_LIT>'<EOL>)<EOL><DEDENT>old_session_kwargs = dict(<EOL>region="<STR_LIT>",<EOL>access_id="<STR_LIT>",<EOL>secret_key="<STR_LIT>",<EOL>)<EOL>new_kwargs = {}<EOL>for arg in aws_args:<EOL><INDENT>if arg in old_session_kwargs:<EOL><INDENT>new_kwargs[old_session_kwargs[arg]] = aws_args[arg]<EOL><DEDENT>else:<EOL><INDENT>new_kwargs[arg] = aws_args[arg]<EOL><DEDENT><DEDENT>return new_kwargs<EOL>
Convert old style options into arguments to boto3.session.Session.