code: def _archive_elements(self):
          
          try:
              stackfile_key, propertyfile_key = self._craft_s3_keys()
  
              template_file = self._config.get('environment', {}).get('template', None)
              bucket = self._config.get('environment', {}).get('bucket', None)
              if not os.path.isfile(template_file):
                  logging.info("{} is not actually a file".format(template_file))
                  return False
  
              logging.info('Copying parameters to s3://{}/{}'.format(bucket, propertyfile_key))
              temp_file_name = '/tmp/{}'.format((str(uuid.uuid4()))[:8])
              with open(temp_file_name, 'w') as dump_file:
                  json.dump(self._parameters, dump_file, indent=4)
  
              self._s3.upload_file(temp_file_name, bucket, propertyfile_key)
  
              logging.info('Copying {} to s3://{}/{}'.format(template_file, bucket, stackfile_key))
              self._s3.upload_file(template_file, bucket, stackfile_key)
  
              self._templateUrl = 'https://s3.amazonaws.com/{}/{}'.format(bucket, stackfile_key)
              logging.info("template_url: " + self._templateUrl)
              return True
          except Exception as x:
              logging.error('Exception caught in copy_stuff_to_S3(): {}'.format(x))
              traceback.print_exc(file=sys.stdout)
              return False
docs: Cloud Formation likes to take the template from S3 so here we put the
          template into S3. We also store the parameters file that was used in
          this run. Note: you can pass anything as the version string but you
          should at least consider a version control tag or git commit hash as
          the version.
  
          Args:
              None
  
          Returns:
              True if the stuff lands in S3 or False if the file doesn't
              really exist or the upload goes sideways.