There are a couple of versions of this script floating around. My inspiration has been this great article
I went through their code and found most of it is not needed and it is a relict of days long gone. Now ActiveStorage has beautiful APIs and its all quite easy.
- create a new service configuration for S3 named it amazon