Supporting a session Token

The environment in which i'm uploading to requires a sessionToken to be supplied, simply adding the following options was enough for me to upload to the designated s3 bucket. I'm not sure if we need to guard against a sessionToken not being provided.
Also the error message that the sdk spits back without this change is the following:
InvalidAccessKeyId: The AWS Access Key Id you provided does not exist in our records.
which was a bit misleading