LN Webworks: AWS S3 Bucket File Upload In Drupal

Sponsored:

If someone googles you right now and you don’t come up? You might as well not exist. Every client, opportunity and connection is passing you by.

You don’t need to know code. RoseHosting lets you launch something you’re proud of this afternoon.

Stop hiding. Build yours today.

Author:
Source

1. Creating an AWS Bucket

  1. Log in to AWS Console: Go to the AWS Management Console and log in to your account.
  2. Navigate to S3: In the AWS Console, find and click on the “S3” service.
  3. Create a Bucket: Click the “Create bucket” button, provide a unique and meaningful name for your bucket, and choose the region where you want to create the bucket.
  4. Configure Options: Set the desired configuration options, such as versioning, logging, and tags. Click through the configuration steps, review your settings, and create the bucket.

2. Uploading a Public Image

$settings['s3fs.access_key'] = "YOUR_ACCESS_KEY";
$settings['s3fs.secret_key'] = "YOUR_SECRET_KEY";
$settings['s3fs.region'] = "us-east-1";
$settings['s3fs.upload_as_public'] = TRUE;

Read more