I'm not familiar with how S3 works, but given the example above, object name would be `"deploys/my-artifact-1.0.0.tgz"`. Is that correct?

If you are trying to get the filename here, perhaps you should try `File.basename` which would give you `"my-artifact-1.0.0.tgz"`