Added tests for S3 configuration. Improved S3 configuration constructor