As John pointed out in the comments, the AWS title is url encoded, so in python, so to convert the S3 object name to the S3 object url, we can just use:
import urllib
object_name = 'Pepper, Pig (#PP).jpg'
object_url = urllib.parse.quote_plus(title)
The results is:
'Pepper%2C+Pig+%28%23PP%29.jpg'
Which works perfectly as when referencing this object in S3.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…