How to configure both public and private storages?

When I add public: true I am unable to upload.
The error is Aws::S3::Errors::AccessDenied: Access Denied

THIS WORKS (all private)
cache: Shrine::Storage::S3.new(prefix: “#{ENV[“CREDENTIALS_ENV”]}/#{ENV[“DOMAIN”]}/cache”, **s3_options),
store: Shrine::Storage::S3.new(prefix: “#{ENV[“CREDENTIALS_ENV”]}/#{ENV[“DOMAIN”]}/store”, **s3_options),
public: Shrine::Storage::S3.new(prefix: “#{ENV[“CREDENTIALS_ENV”]}/#{ENV[“DOMAIN”]}/public”, **s3_options)

THIS FAILS (added public: true to public storage)
cache: Shrine::Storage::S3.new(prefix: “#{ENV[“CREDENTIALS_ENV”]}/#{ENV[“DOMAIN”]}/cache”, **s3_options),
store: Shrine::Storage::S3.new(prefix: “#{ENV[“CREDENTIALS_ENV”]}/#{ENV[“DOMAIN”]}/store”, **s3_options),
public: Shrine::Storage::S3.new(public: true, prefix: “#{ENV[“CREDENTIALS_ENV”]}/#{ENV[“DOMAIN”]}/public”, **s3_options)

here is a link to the shrine.rb file

double check your env credentials and your bucket permissions