Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9145111
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T10:25:58+00:00 2026-06-17T10:25:58+00:00

Am currently managing several AWS accounts and doing so from command line can be

  • 0

Am currently managing several AWS accounts and doing so from command line can be annoying. Every time I have to remove the Public and Private certificate in .ec2 folder and manually replace them with another account to gain access for it.

is there a way for me to handle several certificates/accounts?

I followed the manual in here http://www.robertsosinski.com/2008/01/26/starting-amazon-ec2-with-mac-os-x/ when I first created the command-line

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T10:25:59+00:00Added an answer on June 17, 2026 at 10:25 am

    Here’s what I do:

    Create the following script and save it as ~/bin/aws.sh:

    #!/bin/bash
    export EC2_REGION='us-east-1'
    case "$1" in
    "rbn") 
       export AWS_ACCESS_KEY='AKKDHH2HVQSHVQ32A'
       export AWS_SECRET_KEY='vizCQvkKhmMioAP/BXSe4HANGh47azvAF'
       export AWS_ACCOUNT='RBN'
       ;;
    "gl") 
       export AWS_ACCESS_KEY='AKIADFGDFHHTP7ELQ'
       export AWS_SECRET_KEY='Ty+mNit235235235ETiJY/rEfxJwbQ2h+b'
       export AWS_ACCOUNT='AnotherCompanyA'
       ;;
    "mcg") 
       export AWS_ACCESS_KEY='AKIAJKA2F5KRZQDBZS7A'
       export AWS_SECRET_KEY='tuQIiXgHY0B3nTEy6WaUzTsZwHUg1DiJtlAb'
       export AWS_ACCOUNT='AnotherCompanyB'
       ;;
    *) 
       export AWS_ACCOUNT="No account"
       ;;
    esac
    echo "$AWS_ACCOUNT is active."
    

    Then create the following alias:

    alias aws='client=$1 source aws.sh $client'
    

    Then I just execute it:

    [jjbegin@bane ~]$ aws rbn
    RBN is active.
    [jjbegin@bane ~]$ 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently managing multiple models from a single SITE MANAGER page. I have the
I'm currently managing some C++ code that runs on multiple platforms from a single
Currently, I have several environments which are loaded using NODE_ENV (I'm using RailwayJS /
I am currently managing several of my own sites. Their htaccess files are repeatedly
Currently, I have all my objects managing their own memory, allocating with new in
I want to have a diagnostic log that is produced by several tasks managing
I'm currently using git for managing several projects, however, one question has been bugging
I am currently manually managing the lifecycle of objects in my project. I am
Currently, I'm working on a project where I have a server - client relationship
Currently I have 2 ways of displaying images in a cell, which way will

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.