DEV Community

Haripriya Veluchamy
Haripriya Veluchamy

Posted on

Getting Started with AWS Security Credentials and CLI ๐Ÿง‘โ€๐Ÿ’ป

Hey cloud enthusiasts! ๐Ÿ‘‹ Today we're diving into AWS security credentials and how to set up your AWS CLIโœจ

What We'll Cover ๐Ÿ“

  • Why AWS credentials matter
  • Setting up your tools
  • Configuring AWS CLI
  • Testing with S3 commands

First Things First: Why Care About AWS Credentials? ๐Ÿค”

Think of AWS credentials as your digital keys ๐Ÿ”‘ to the AWS kingdom. Just like you wouldn't share your house keys with strangers, you need to keep these credentials safe and secure. They let you:

  • Access AWS services safely
  • Run commands from your computer
  • Keep your resources protected
  • Track who's doing what in your AWS account

Let's Get Our Tools Ready! ๐Ÿ› ๏ธ

1. Python Installation

First, we need Python on our machine. It's super easy:

  • Head over to python.org
  • Download the latest version
  • Install and verify with:
python --version
Enter fullscreen mode Exit fullscreen mode

2. AWS CLI Setup

Next up, let's get AWS CLI installed!

Linux๐Ÿง:

sudo apt-get update
sudo apt-get install awscli
Enter fullscreen mode Exit fullscreen mode

Setting Up AWS Credentials ๐Ÿ”

Now for the fun part! Let's get your AWS credentials configured:

  1. Get your access keys from AWS Console:

    • Go to IAM โ†’ Users โ†’ Your User โ†’ Security Credentials
    • Create new access key (save it somewhere safe!)
  2. Run this magic command:

aws configure
Enter fullscreen mode Exit fullscreen mode
  1. Fill in your details when prompted:
AWS Access Key ID: [Your Access Key]
AWS Secret Access Key: [Your Secret Key]
Default region name: [Pick your region, e.g., us-east-1]
Default output format: [json]
Enter fullscreen mode Exit fullscreen mode

Let's Test It Out! ๐Ÿงช

Want to make sure everything's working? Let's list your S3 buckets:

aws s3 ls
Enter fullscreen mode Exit fullscreen mode

You should see something like:

2024-12-30 11:50:25 setchukoss3bucket #your bucket name


Enter fullscreen mode Exit fullscreen mode

Cool S3 Commands to Try ๐ŸŽฎ

Here are some handy commands to play with:

# See what's in your bucket
aws s3 ls s3://your-bucket-name/

# Upload a file
aws s3 cp cool-file.txt s3://your-bucket-name/

# Download a file
aws s3 cp s3://your-bucket-name/cool-file.txt ./
Enter fullscreen mode Exit fullscreen mode

Keep Your Credentials Safe! ๐Ÿ›ก๏ธ

Quick security tips to remember:

  • Never share your access keys (seriously, never! ๐Ÿšซ)
  • Rotate your keys regularly (like changing your password)
  • Only give permissions that are needed
  • Don't commit credentials to Git (big no-no! โŒ)

Having Troubles? ๐Ÿค”

Common issues and quick fixes:

Can't find credentials?

  • Double-check your aws configure setup
  • Make sure you saved the credentials file

Access denied?

  • Check your IAM permissions
  • Make sure you're using the right profile

You're All Set! ๐ŸŽ‰


Written by an AWS learner documenting her cloud journey. Still learning, still making mistakes, but getting better every day. ๐ŸŒฑ

Top comments (0)