Aws Cli
Steps to Install AWS CLI on Ubuntu EC2 Instance:
Update the Package List: First, update your package list to ensure you're installing the latest version of the AWS CLI:
sudo apt updateInstall AWS CLI Version 2: AWS CLI version 2 is the recommended version. You can install it by running the following commands:
Install dependencies:
sudo apt install unzip curlDownload the AWS CLI version 2:
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"Unzip the installer:
unzip awscliv2.zipRun the installer:
sudo ./aws/installVerify Installation: After installation, verify that AWS CLI version 2 is installed correctly by running:
aws --versionYou should see something like:
aws-cli/2.x.x Python/3.x.x Linux/xx.x.xConfigure AWS CLI: If you haven't already configured AWS CLI on this instance, you can run the configuration command to set up your AWS credentials:
aws configureYou'll need to provide:
AWS Access Key ID
AWS Secret Access Key
Default region name
Default output format (e.g., json)
Run the AWS S3 Command: Once the AWS CLI is installed and configured, you should be able to run your aws s3 ls command:
aws s3 ls