0

His there an option that can be sent as an argument of Shrine::Storage::S3.new that sets the use of an IAM Profile to true, just like Carrierwave does?

For example:

s3_options = {
  use_iam_profile: true,
}

Shrine::Storage::S3.new(
  upload_options: { server_side_encryption: "AES256" },
  **s3_options,
)
jpac
  • 69
  • 5

1 Answers1

1

Shrine's S3 storage supports any configuration that Aws::S3::Client#initialize supports. If I remember correctly, in order to use the IAM profile, you should simply not pass any credentials (and specify only the bucket name).

Shrine::Storage::S3.new(
  bucket: "your-bucket-name",
  upload_options: { ... },
)
Janko
  • 8,985
  • 7
  • 34
  • 51