❌

Normal view

There are new articles available, click to refresh the page.
Before yesterdayMain stream

How to configure AWS CLI and configure in ubuntu

7 January 2024 at 06:59

Install AWS CLI
$ sudo apt install awscli -y
To check for the version
$ aws –version
To configure AWS account crdentials
copy the access and secret key from AWS account security credentials
$ aws configure
AWS Access Key ID [None]: *****************Β 
AWS Secret Access Key [None]: ******************
Default region name [None]: ap-south-1
Default output format [None]: json or table or text

AWS CLI for AWS RDS PgSQL

12 December 2023 at 02:40

To create postgres DB
$ aws rds create-db-instance --db-instance-identifier demo-postgresql --db-instance-class db.t3.micro --engine postgres --master-username postgres --master-user-password passcode123 --allocated-storage 20

To describe and get the endpoint url
$ aws rds describe-db-instances --db-instance-identifier demo-postgresql | grep Address

To access the remote postgresql
$ psql --host=<endpoint_url> --port=5432 --username=postgres
--dbname=postgres --password

To delete the db instance without final snapshot and automated backups
$ aws rds delete-db-instance --db-instance-identifier demo-postgresql
--skip-final-snapshot --delete-automated-backups

AWS CLI for AWS RDS MySQL

12 December 2023 at 02:35

To create a mysql db
$ aws rds create-db-instance --db-instance-identifier demo-mysql --db-instance-class db.t3.micro --engine mysql --master-username admin --master-user-password passcode123 --allocated-storage 20

To describe and get the endpoint url
$ aws rds describe-db-instances --db-instance-identifier demo-mysql | grep Address

To access the remote mysql DB
$ mysql -h <endpoint_url> -P 3306 -u admin -p

To delete the db instance without final snapshot and automated backups
$ aws rds delete-db-instance --db-instance-identifier demo-mysql --skip-final-snapshot --delete-automated-backups

❌
❌