Skip to content

AWS CLI

Progress checklist

The AWS CLI is how you authenticate to AWS
Amazon Web Services — the cloud platform used throughout this walkthrough.
from your machine. Terraform uses the same credential chain to create resources, and aws eks update-kubeconfig uses it to write your kubeconfig after the cluster exists. Getting this right first avoids authentication errors in every subsequent step.

  1. Install the AWS CLI. Required

    Install via Homebrew
    brew install awscli

    Verify the installation:

    Terminal window
    aws --version

    You should see aws-cli/2.x.x — version 2 is required.

  2. Configure AWS access. Required

    Choose the path that matches how you set up access in the previous steps.

    You need the Access Key ID and Secret Access Key you created in the AWS Account step.

    Terminal window
    aws configure

    Enter the following when prompted:

    • AWS Access Key ID — the key ID (starts with AKIA...)
    • AWS Secret Access Key — the secret
    • Default region name — the region you chose (e.g. ap-southeast-6)
    • Default output formatjson

    This writes credentials to ~/.aws/credentials and config to ~/.aws/config.

  3. Verify access. Required

    Terminal window
    aws sts get-caller-identity

    Expected output:

    {
    "UserId": "AIDA...",
    "Account": "123456789012",
    "Arn": "arn:aws:iam::123456789012:user/eks-admin"
    }

    For IAM Identity Center the ARN will contain assumed-role instead of user. Either is correct as long as the account ID matches your account.

  4. Confirm the default region.

    Terminal window
    aws configure get region

    The output should match the region you chose. If it’s blank or wrong, set it:

    Terminal window
    aws configure set region ap-southeast-6

    Replace ap-southeast-6 with your region if different.

Continue to Terraform to install the infrastructure-as-code tool.