Tuesday, May 2, 2023

AWS CLI Commands

We can use commands to perform various operations on an AWS account via AWS CLI (Command Line Interface).  The data for each page on the AWS console can be obtained via a corresponding cli command

Pre-requisites to use AWS CLI Commands:
  • Make sure AWS CLI is installed on the system
  • Make sure that AWS is configured properly via "aws configure" command            
aws configure set aws_access_key_id {ACCESS_KEY_ID}
aws configure set aws_secret_access_key {SECRET_ACCESS_KEY}
aws configure set aws_session_token {SESSION_TOKEN}

Note* To generate access key id and secret access key, please read the blog https://anshulsood2006.blogspot.com/2023/04/generating-access-key-id-and-secret.html

Note* To find the account id corresponding to your AWS account, please read the blog https://anshulsood2006.blogspot.com/2023/06/how-to-find-account-id-from-aws-console.html
  • Find the list of all the clusters available
    • aws ecs list-clusters
  • Find list of all ECS services in a given cluster
    • aws ecs list-services --cluster {CLUSTER_NAME}
  • Find the list of all tasks in a given cluster
    • aws ecs list-tasks --cluster {CLUSTER_NAME}

 

No comments:

Post a Comment

SpringBoot Application Event Listeners

When a spring boot application starts few events occurs in below order ApplicationStartingEvent ApplicationEnvironmentPreparedEvent Applicat...