How to Access AWS Resources via AWS CLI

Postgraduate in Communications Engineering with working experience in the Support Desk and self-study in software development.
Search for a command to run...

Postgraduate in Communications Engineering with working experience in the Support Desk and self-study in software development.
The git log command is used to view the commit history of a Git repository. You can customize the output format to show specific details in a more readable or structured way. Below are some useful variations and formatting options for git log: To sh...

Overview This article will teach us how to: Install Ubuntu Server 24.04 on a laptop from scratch Install Ubuntu server by using Vagrant tool with ISO image Prerequisites: A laptop without any OS installed; A virtualization software Virtualbox t...

The /etc/passwd and /etc/shadow files are the backbone of Linux user management. Together, they store user account information and handle authentication securely. This article provides a hands-on guide to understanding these files, their structure, a...

In Linux, links are powerful tools that allow you to create references to files and directories. There are two main types of links: hard links and soft links (also known as symbolic links or symlinks). Understanding the differences between these two ...

A hostname is a human-friendly name given to a computer. It is a unique identifier that allows us to identify the machine in various network communications, making it easier to locate and manage devices. Type: hostname To see where it is stored, typ...

There are 3 ways of accessing AWS resources:
AWS Management Console;
AWS CLI;
AWS SDK;
AWS CLI (Command Line Interface) is a unified tool provided by Amazon Web Services (AWS) that allows developers, system administrators, and other users to interact with various AWS services from the command line. It provides a consistent and efficient way to interact with AWS services, allowing users to automate tasks, build scripts, and integrate AWS functionality into their workflows and applications. It supports features like authentication and access control, output formatting options, and extensive documentation for each command.
To configure the AWS CLI, follow these steps:
Install the AWS CLI:
Follow the instructions provided in the official AWS CLI User Guide for your specific operating system: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html
Create Access Keys:
After installation, you will need to create an AWS Access Key ID, Secret Access Key, default region, and output format (optional) to configure your AWS credentials.
To create an "AWS Access Key ID", click on "Users" and go to the Users detailed page. Click on the "Security credentials" tab.

Click on the "Create access key" button, choose "Command Line Interface (CLI)" use case, and check the box to confirm you understand the recommendation:
Configure the AWS CLI:
Finally, when the Access Key is generated, copy the credentials and paste them into the AWS CLI.
aws configure
AWS Access Key ID [None]: AKIA6PFCJ6FNMOXM2JQC
AWS Secret Access Key [None]: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
Default region name [None]: us-west-2
Default output format [None]: json
Verify AWS CLI installation:
To ensure the AWS CLI is installed correctly, open a terminal or command prompt and run:
aws --version
// aws-cli/2.12.6 Python/3.11.4...
It should display the version of the AWS CLI installed on your system.
Use AWS CLI commands to interact with resources:
Once the AWS CLI is installed and configured, you can use various AWS CLI commands to interact with AWS resources. Here are a few examples:
aws iam list-users