Skip to content

Latest commit

 

History

History
114 lines (71 loc) · 1.87 KB

Terraform-AWS.md

File metadata and controls

114 lines (71 loc) · 1.87 KB

Installation Guide for AWS CLI and Terraform

This guide provides instructions for installing the AWS CLI and Terraform on a Linux system.


Prerequisites

Ensure you have the necessary tools installed:

  • curl: For downloading files from the internet.
  • unzip: For extracting files.

To install these tools, run:

sudo apt update && sudo apt install -y curl unzip

Installing Terraform

To install Terraform, use the following commands:

  1. Download the latest Terraform package:

    curl -fsSL "https://releases.hashicorp.com/terraform/1.9.8/terraform_1.9.8_linux_amd64.zip" -o terraform.zip
  2. Unzip the downloaded file:

    unzip -o terraform.zip
  3. Move the terraform binary to /usr/local/bin for global access:

    sudo mv terraform /usr/local/bin/
  4. Remove the downloaded zip file:

    rm terraform.zip
  5. Verify the installation:

    terraform -v

Installing AWS CLI

To install the AWS CLI, use the following commands:

  1. Download the AWS CLI installation package:

    curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
  2. Unzip the downloaded file:

    unzip awscliv2.zip
  3. Run the installer:

    sudo ./aws/install
  4. Verify the installation:

    aws --version
  5. Remove the installation files:

    rm -rf awscliv2.zip aws

Configuring AWS CLI

After installing the AWS CLI, configure it using the following command:

aws configure

This command will prompt you to enter your:

  • AWS Access Key ID
  • AWS Secret Access Key
  • Default region name
  • Default output format

Follow the prompts to complete the configuration.


You now have both the AWS CLI and Terraform installed and ready to use!