Skip to content

Instantly share code, notes, and snippets.

@efi-mk
Last active August 5, 2018 12:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save efi-mk/539440cb03b23b05d2ea86df530fe580 to your computer and use it in GitHub Desktop.
Save efi-mk/539440cb03b23b05d2ea86df530fe580 to your computer and use it in GitHub Desktop.
import boto3
from s3_scheduler.scheduler import Scheduler
from s3_scheduler.utils import nowut
s3_resource = boto3.resource("s3")
s3_client = boto3.client("s3")
scheduler = Scheduler("bucket", "/path", s3_resource, s3_client)
time = nowut() + timedelta(minutes=10)
upload_to = scheduler.schedule(time, "s3-bucket", "s3_files-important", "content")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment