Skip to content

Instantly share code, notes, and snippets.

@robisatthefunction
Created December 5, 2024 15:49
Show Gist options
  • Save robisatthefunction/36d0d05f21e6ecb14c97fd8f07a02cbf to your computer and use it in GitHub Desktop.
Save robisatthefunction/36d0d05f21e6ecb14c97fd8f07a02cbf to your computer and use it in GitHub Desktop.
import boto3
# Get AWS credentials from your Optimizely Interface https://docs.developers.optimizely.com/web/docs/customer-profiles#bulk-upload
client = boto3.client(
's3',
aws_access_key_id = '',
aws_secret_access_key = ''
)
# https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-bucket-intro.html
# https://boto3.amazonaws.com/v1/documentation/api/latest/guide/s3-uploading-files.html
file_name = '' # Your customer data in current folder
bucket_name = ''
s3_path = ''
client.upload_file(Filename=file_name, Bucket=bucket_name, Key=s3_path)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment