refactored S3 configuration

* added transactional output