You are currently viewing How to add Object Storage (S3 bucket) in AWS Lightsail instance?

How to add Object Storage (S3 bucket) in AWS Lightsail instance?

How to add Object Storage (S3 bucket) in AWS Lightsail instance?

Hello Everyone

Welcome to CloudAffaire and this is Debjeet.

AWS Lightsail provides object storage in the form of S3 bucket that you can attach to your Lightsail instance to store any static contents like images. S3 bucket is one of the cheapest cloud storages and can greatly reduce your storage cost.

How to add Object Storage (S3 bucket) in AWS Lightsail instance?

Prerequisites:

How to create Object Storage (S3 bucket) for AWS Lightsail instance?

Step 1: Login to AWS management console.

https://aws.amazon.com/

Step 2: Navigate to Lightsail console.

How to create Object Storage (S3 bucket) for AWS Lightsail instance?

Step 3: In the Lightsail portal select “Storage” tab, click on “Create bucket”.

How to create Object Storage (S3 bucket) for AWS Lightsail instance?

Note: Additional cost is associated with creating an object storage.

Select storage plan and provide a name and click “Create bucket”.

How to create Object Storage (S3 bucket) for AWS Lightsail instance?

How to create Object Storage (S3 bucket) for AWS Lightsail instance?

Note: The name must be unique across AWS.

How to upload and download objects in AWS Lightsail from console:

Step 1: In Lightsail portal => Click Storage => Select your bucket.

How to upload and download objects in AWS Lightsail from console

Step 2: Select “Storage” tab and click “Upload” to upload a new object in Lightsail object storage.

How to upload and download objects in AWS Lightsail from console

Select the object that you want to upload and upload to Lightsail object storage.

Step 3: Once the object is uploaded, you can download the object by selecting the object and clicking on the download icon.

How to upload and download objects in AWS Lightsail from console

How to access object storage from AWS Lightsail instance:

Step 1: In your object storage page, select the “Permissions” tab and click “Attach instance”. Select your Lightsail instance and click “Attach”.

How to access object storage from AWS Lightsail instance

Step 2: Upload an object to Lightsail object storage from AWS Lightsail instance

Connect to your Lightsail instance

How to use Lightsail object storage in your WordPress website hosted in AWS Lightsail:

Step 1: Change the object storage permission to allow objects to be public.

In Lightsail portal => Click Storage => Select your bucket.

How to use Lightsail object storage in your WordPress website hosted in AWS Lightsail

Go to “Permissions” tab and click “Change permissions”. Select “Individual objects can be made public and read-only” and click “Save”.

How to use Lightsail object storage in your WordPress website hosted in AWS Lightsail

Step 2: Login to your WordPress dashboard and install and activate the WP Offload Media Lite plugin.

How to use Lightsail object storage in your WordPress website hosted in AWS Lightsail

Step 3: In the WP Offload Media Lite plugin setting, select “Amazon S3” with IAM role option and click “Next”.

How to use Lightsail object storage in your WordPress website hosted in AWS Lightsail

Click “Browse existing buckets” and select the object storage that you have created previously.

How to use Lightsail object storage in your WordPress website hosted in AWS Lightsail

How to use Lightsail object storage in your WordPress website hosted in AWS Lightsail

Enable “Force HTTPS” and “Remove Files From Server” and click “Save Changes”.

How to use Lightsail object storage in your WordPress website hosted in AWS Lightsail

Now all your media files will be uploaded to your object storage. Test it out by uploading an image in your WordPress media library.

How to use Lightsail object storage in your WordPress website hosted in AWS Lightsail

You can also view all uploaded media in your Lightsail object storage console.

How to use Lightsail object storage in your WordPress website hosted in AWS Lightsail

Hope you have enjoyed this article. To get more details on Lightsail, please refer below official documentation.

https://lightsail.aws.amazon.com/ls/docs/en_us/all

Leave a Reply