code: def validate_account_credentials(deployment, context):
      
      boto_args = {'region_name': context.env_vars['AWS_DEFAULT_REGION']}
      for i in ['aws_access_key_id', 'aws_secret_access_key',
                'aws_session_token']:
          if context.env_vars.get(i.upper()):
              boto_args[i] = context.env_vars[i.upper()]
      if isinstance(deployment.get('account-id'), (int, six.string_types)):
          account_id = str(deployment['account-id'])
      elif deployment.get('account-id', {}).get(context.env_name):
          account_id = str(deployment['account-id'][context.env_name])
      else:
          account_id = None
      if account_id:
          validate_account_id(boto3.client('sts', **boto_args), account_id)
      if isinstance(deployment.get('account-alias'), six.string_types):
          account_alias = deployment['account-alias']
      elif deployment.get('account-alias', {}).get(context.env_name):
          account_alias = deployment['account-alias'][context.env_name]
      else:
          account_alias = None
      if account_alias:
          validate_account_alias(boto3.client('iam', **boto_args),
                                 account_alias)
docs: Exit if requested deployment account doesn't match credentials.