Joel Joel Binks
Joel Joel Binks

Reputation: 1666

Laravel accessing S3 bucket vs AWS Role

I have an EC2 instance that runs Laravel 5.1. I am using an S3 bucket through Laravel's api:

AMAZON_KEY=key
AMAZON_SECRET=secret
AMAZON_REGION=us-west-2
AMAZON_S3_BUCKET=my_app_bucket

But I already set up a ROLE that enables this box to use that particular bucket. Why do I also need a key and a secret? From an analysis of the code, it looks like Laravel always demands a key and a secret, so it would seem that I have to actually create an IAM user account with key/secret and use that for s3 access instead of using roles, which is preferred. Is there a way around this, or is this just how Laravel S3 access works?

Upvotes: 4

Views: 4621

Answers (1)

ceejayoz
ceejayoz

Reputation: 180023

A fix to use IAM credentials for filesystem, queue, and email was merged a few days ago, so upgrading to Laravel v5.1.7 should do the trick.

https://github.com/laravel/framework/pull/9558

Upvotes: 4

Related Questions