List all S3 buckets:
aws s3 ls
- Upload a file to an S3 bucket:
aws s3 cp local-file.txt s3://bucket-name/ - Download a file from an S3 bucket:
aws s3 cp s3://bucket-name/remote-file.txt local-file.txt - Sync local directory to an S3 bucket (upload only changed files): aws s3 sync local-dir s3://bucket-name/
- Delete a file from an S3 bucket:
aws s3 rm s3://bucket-name/remote-file.txt - List all EC2 instances:
aws ec2 describe-instances - Start an EC2 instance:
aws ec2 start-instances --instance-ids i-1234567890abcdef0 - Stop an EC2 instance:
aws ec2 stop-instances --instance-ids i-1234567890abcdef0 - Create an RDS database instance:
aws rds create-db-instance --db-instance-identifier mydbinstance --engine mysql --db-instance-class db.t2.micro --allocated-storage 20 --master-username admin --master-user-password mysecretpassword - List all Lambda functions:
aws lambda list-functions - Invoke a Lambda function:
aws lambda invoke --function-name my-function --payload '{"key": "value"}' output.json - Create a new SNS topic:
aws sns create-topic --name my-topic aws sns subscribe --topic-arn arn:aws:sns:us-west-2:123456789012:my-topic --protocol email --notification-endpoint my-email@example.com - List all SQS queues:
aws sqs send-message --queue-url https://sqs.us-west-2.amazonaws.com/123456789012/my-queue --message-body "Hello, AWS!" - Create a new DynamoDB table:
aws dynamodb create-table --table-name my-table --attribute-definitions AttributeName=id,AttributeType=S --key-schema AttributeName=id,KeyType=HASH --provisioned-throughput ReadCapacityUnits=5,WriteCapacityUnits=5 - List all CloudFront distributions:
aws cloudfront list-distributions - Create a CloudFront invalidation:
aws cloudfront create-invalidation --distribution-id E1A2B3C4D5E6F7 --paths /path1/* /path2/* - List all IAM users:
aws iam list-users - Create a new IAM user: aws iam create-user --user-name my-user
Hi, I'm a linux system administrator / DevOps / Cloud Administrator with more than 10 years of experience in the industry. I have shared my real life knowledge and experience here.
Thursday, August 10, 2023
AWS CLI Examples on Linux | AWS CLI
Subscribe to:
Post Comments (Atom)
Linux server hardening | Secure Linux Servers
Linux server hardening is the process of securing a Linux server by reducing its attack surface and mitigating security risks. The goal is ...
-
Introduction: Access Control Lists (ACL) in Linux provide a powerful and flexible way to manage permissions beyond the traditional read, wri...
-
User management is a fundamental aspect of Linux system administration. Whether you're a seasoned sysadmin or a Linux enthusiast, unde...
-
Introduction Network File System (NFS) is a popular protocol that allows you to share files and directories between Unix-like systems over a...
No comments:
Post a Comment