UPTO 63
%OFF
How to Get AWS S3 Bucket Access Key ID and Secret Access Key

How to Get AWS S3 Bucket Access Key ID and Secret Access Key

If you want to access AWS S3 cloud storage and are searching for the right ways to get AWS S3 Bucket Access Key ID and Secret Access Key then you are in the right place. 

AWS S3 (Simple Storage Service) is a popular cloud storage solution that allows you to store and manage data securely. To access an S3 bucket programmatically, you need an Access Key ID and Secret Access Key. These credentials authenticate your requests and allow applications to interact with AWS services.

But where do you find these keys, and how do you use them safely? Don’t worry—we’ve got you covered! 

In this guide, you’ll learn step-by-step how to generate an AWS S3 Bucket Access Key ID and Secret Access Key for AWS S3. 

Let’s get started!

AWS S3 Overview

AWS S3 landing page

Amazon S3 (Simple Storage Service) is a cloud-based object storage service. It is provided by Amazon Web Services (AWS). It allows users to store and retrieve any amount of data from anywhere on the web at any time. This flexibility makes it suitable for a wide range of applications, including data backups, content storage, and disaster recovery.

One of Amazon S3’s key features is its scalability. It can handle vast amounts of data without the need for upfront hardware investments. This means you can start small and expand your website storage as needed, paying only for what you use.

Amazon S3 offers various storage classes to optimize cost and performance based on data access patterns. For example, the S3 Standard class is ideal for frequently accessed data, while the S3 Standard-Infrequent Access (Standard-IA) class is created for data that is accessed less often but requires rapid retrieval when needed. Additionally, S3 Glacier classes provide low-cost options for archiving data that is rarely accessed.

Security is a top priority with Amazon S3. It provides multiple features to protect data, including encryption, access control policies, and integration with AWS Identity and Access Management (IAM) to manage user permissions. These features help ensure that data stored in S3 is secure and compliant with various regulatory requirements.

Why Do You Need an AWS S3 Bucket Access Key ID and Secret Access Key?

An Access Key ID and Secret Access Key are essential for securely accessing AWS services like S3 programmatically. These credentials work like a username and password, allowing applications and scripts to interact with AWS resources.

You need these keys when using AWS SDKs, CLI, or third-party tools that require authentication. They help verify your identity and grant the necessary permissions to perform actions like uploading, downloading, or managing S3 bucket data.

Without these keys, AWS services cannot authenticate your requests, and you won’t be able to access your S3 bucket remotely. However, for security reasons, it’s best to avoid using long-term credentials and instead rely on IAM roles whenever possible.

Prerequisites

Before generating an AWS S3 Bucket Access Key ID and Secret Access Key, you need a few things in place. Using these credentials, you can connect your WordPress site to Amazon S3. To integrate with your WordPress site you have to install a plugin and access it to connect with AWS S3. 

  1. Install a Plugin: You need to install an offload media plugin like Next3 Offload. To access the plugin and offload your media files to AWS S3 you need to insert the credentials in the plugin’s required fields. 
  2. An AWS Account: You must have an active AWS account to access the AWS Management Console. If you don’t have one, you can sign up at aws.amazon.com.
  3. IAM User Creation Permissions: You need the right permissions to create and manage IAM users. If you are not the account owner, ask an administrator to grant you access or create the keys for you.

Once you have these prerequisites, you can proceed to generate your AWS credentials.

Step-by-Step Guide to Getting AWS S3 Access Key ID & Secret Access Key

Generating an AWS S3 Bucket Access Key ID and Secret Access Key in AWS is simple but requires proper permissions. These keys allow you to authenticate and access AWS services like S3. You need to insert the Keys through your offloading plugin like Next3 Offload. You can follow the blog to briefly learn about how to integrate Amazon S3 with WordPress to offload files using the Next3 Offload media plugin.

Below, we’ll walk you through the process step by step. Follow these instructions carefully to ensure secure access to your AWS resources.

Step 1: Log in to the AWS Console

If you have an AWS account, you can sign in easily. Click here to access your account. Ensure you have the right permissions before proceeding.

WordPress amazon S3 sign in

If you don’t have an AWS account, you’ll need to register before proceeding.

sign up for Aws

Step 2: Create an IAM user

Once you log into the AWS console, the next step is to create a new IAM user. This user will have the necessary permissions to access AWS services. There are two methods you can follow to create an IAM user. Choose the one that best fits your needs.

Method 1: 

Enter the desired name in the User name field.

Then, check the box for Access key – Programmatic access to enable AWS credentials.

Access key - Programmatic access to enable AWS credentials

You need to assign specific permissions to the new user to manage S3 buckets and objects.

For first-time Next3 Offload Media setup, the AmazonS3FullAccess policy ensures smooth operation and avoids issues.

Advanced AWS users can opt for a Custom IAM Policy for more control over permissions.

IAM policies can be modified later to restrict access to only the necessary resources for Next3 Offload Media.

Choose “Attach existing policies directly.” In the filter policies search box, type “s3” to find relevant policies. Scroll down and select the “AmazonS3FullAccess” policy. Finally, click “Next: Tags” to proceed.

assign specific permissions

Here, you have the option to add tags. Adding tags is optional but can help with organization and management if you use AWS frequently.

If you don’t need tags, you can skip this step. Now, click “Next: Review” to continue.

add tags

Review all the details carefully. If everything looks correct, click the “Create user” button to proceed.

Create user button to proceed

You will now see the user’s security credentials, including the Secret Access Key and Access Key ID.

Make sure to download these credentials as a .csv file and store them in a secure location.

Amazon will not display the keys again, and if you lose them, the secret keys cannot be retrieved.

If you lose the keys, you can always create a new set from the AWS console. Just remember to update your applications with the new credentials.

user's security credentials

Method 2:

After logging into the console, you’ll need to create a new IAM user. Enter the user’s name in the User name field.

Next, select Programmatic access under Access type. Then, click on the Next: Permissions button to continue.

Specify user details

Now, choose a permission policy. As a first-time user, select AmazonS3FullAccess. This policy is also recommended for smooth setup and operation.

work with permission policies

Once you’ve selected the appropriate policy, click on the Create user button to finalize the process.

Create user button to finalize the process

Now, go to IAM in the AWS console, then click on Users. Find and select next3, and then click on Security credentials.

Security credentials

In this create access key section, you have to go through three steps. In the first step of Access key best practices & alternatives, you need to select the Command Line Interface.

Access key best practices & alternatives

Next, move to the second step. Set a description tag for the access key, then click on Create access key to generate the new credentials.

Set a description tag

In the third step, you can now retrieve the AWS S3 Bucket Access Key ID and Secret Access Key. Make sure to download or securely store these keys, as the secret key will not be displayed again.

retrieve the Access Key ID and Secret Access Key

Step 3: Bucket Public Permission

There is also a Block public access (account settings) page, which can be accessed from the Amazon S3 sidebar. You should disable public access to objects in both existing and new buckets to ensure better security for your data.

Go to Amazon S3 in the console, then select Buckets. Click on the bucket name you want to configure.

Next, click on the Permissions tab to manage access settings.

Permissions tab

Now, you need to check the box for Block all public access. After that, click on the Save Changes button to apply the settings.

Block all public access

From Edit Object Ownership, check the box for ACLs enabled and Object writer.

Make sure to click on the Save Changes button to save all the settings and complete the setup.

Check the box for ACLs enabled and Object writer

Final Thoughts

Now that you have successfully obtained your AWS S3 Bucket Access Key ID and Secret Access Key, the next step is integrating them with your WordPress site.

To offload your media files to AWS S3, you need to install an offload media plugin like Next3 Offload. Once installed, simply enter your AWS credentials in the plugin’s required fields to establish the connection.

With everything in place, you can efficiently manage your media files, taking full advantage of AWS S3’s scalability and security. Enjoy seamless offloading and optimized storage for your WordPress site!

You May Also Read

washer
Mehrin Ferdous Meem
Written by

Mehrin Ferdous Meem

Mehrin is a content writer of ThemeDev who prefers to write about tech products, travelling, health, food, lifestyle, marketing, technology etc. She also works for creating video. She has completed her Bachelor's degree in Computer Science and Engineering. Her hobbies include blogging, reading, cooking etc.

Table of Content

Table of Contents