Here is what you need to do:
* This is Amazon key ID.
* This is the secret key.
I have, from a Splunk python script, developed coldToFrozenPlusS3Uplaod.py that encrypts and uploads frozen buckets to S3.
It can be found here: https://github.com/marboxvel/Encrypt-upload-archived-Splunk-buckets
Im using your script here is sample one getting issues
import sys, os, gzip, shutil, subprocess, random, gnupg
ARCHIVE_DIR = "/splunk/index/splunk/archiveindex"
scriptpath = '/opt/splunk/etc/apps/Encrypt-upload-archived-Splunk-buckets-master/coldToFrozenPlusS3Uplaod.py'
logfile_path = '/opt/splunk/var/log/splunk/'
gnuhomedir = /home/splunkq/.gnupg
reciepient_email = email@example.com
logger = applyLogging.getmodulelogger(appname='SplunkArchive',filepath=logfilepath)
all are same