Skip to content

Instantly share code, notes, and snippets.

@edumunozsala
Last active September 25, 2020 18:19
Show Gist options
  • Save edumunozsala/eee75359eac153508457bf115ebb123d to your computer and use it in GitHub Desktop.
Save edumunozsala/eee75359eac153508457bf115ebb123d to your computer and use it in GitHub Desktop.
Upload data to S3
import sagemaker
# Get the session id
sagemaker_session = sagemaker.Session()
# Get the bucet, in our example the default buack
bucket = sagemaker_session.default_bucket()
# Set the S3 subfolder where our data will be stored
prefix = 'sagemaker/char_level_rnn'
# Get the role for permission
role = sagemaker.get_execution_role()
nput_data = sagemaker_session.upload_data(path=DATA_PATH, bucket=bucket, key_prefix=prefix)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment