I was working on making the access id a part of the command-line arguments, then asking for the secret access key using:
import getpass
pw = getpass.getpass('Password: ')

Something else broke for me so I gave up but I think this will be a good approach.