code: def generate_scope_string(date, region):
      
      formatted_date = date.strftime("%Y%m%d")
      scope = '/'.join([formatted_date,
                        region,
                        's3',
                        'aws4_request'])
      return scope
docs: Generate scope string.
  
      :param date: Date is input from :meth:`datetime.datetime`
      :param region: Region should be set to bucket region.