| أمر | وصف |
|---|
aws configure | قم بتكوين اعتمادات AWS والمنطقة |
aws configure list | إظهار التكوين الحالي |
aws configure set region us-west-2 | تعيين المنطقة الافتراضية |
aws configure set output json | تعيين تنسيق الإخراج |
aws sts get-caller-identity | تحقق من الهوية الحالية |
aws configure list-profiles | قم بسرد جميع الملفات الشخصية المكونة |
aws configure --profile myprofile | قم بتكوين ملف تعريف مسمى |
التثبيت والتكوين
| أمر | وصف |
|---|
aws ec2 describe-instances | قائمة جميع الحالات |
aws ec2 run-instances --image-id ami-12345 --instance-type t2.micro | إطلاق مثيل |
aws ec2 start-instances --instance-ids i-1234567890abcdef0 | ابدأ المثيل |
aws ec2 stop-instances --instance-ids i-1234567890abcdef0 | إيقاف المثيل |
aws ec2 terminate-instances --instance-ids i-1234567890abcdef0 | أوقف المثيل |
aws ec2 reboot-instances --instance-ids i-1234567890abcdef0 | إعادة تشغيل المثيل |
إدارة المثيلات
| أمر | وصف |
|---|
aws ec2 describe-security-groups | قائمة مجموعات الأمان |
aws ec2 create-security-group --group-name MySecurityGroup --description "My security group" | إنشاء مجموعة أمان |
aws ec2 authorize-security-group-ingress --group-id sg-12345 --protocol tcp --port 80 --cidr 0.0.0.0/0 | أضف قاعدة دخول |
aws ec2 revoke-security-group-ingress --group-id sg-12345 --protocol tcp --port 80 --cidr 0.0.0.0/0 | إزالة القاعدة الداخلة |
| أمر | وصف |
|---|
aws ec2 describe-key-pairs | قائمة أزواج المفاتيح |
aws ec2 create-key-pair --key-name MyKeyPair --query 'KeyMaterial' --output text > MyKeyPair.pem | إنشاء زوج مفاتيح |
aws ec2 delete-key-pair --key-name MyKeyPair | مفتاح الزوج حذف |
| أمر | وصف |
|---|
aws s3 ls | قائمة جميع الدلاء |
aws s3 mb s3://my-bucket | إنشاء دلو |
aws s3 rb s3://my-bucket | إزالة دلو فارغ |
aws s3 rb s3://my-bucket --force | احذف الدلو وكل محتوياته |
aws s3 ls s3://my-bucket | قائمة الكائنات في الدلو |
aws s3 ls s3://my-bucket --recursive | قائمة بجميع الكائنات بشكل متكرر |
عمليات الدلو
| أمر | وصف |
|---|
aws s3 cp file.txt s3://my-bucket/ | رفع الملف |
aws s3 cp s3://my-bucket/file.txt . | تحميل الملف |
aws s3 sync ./local-folder s3://my-bucket/ | مزامنة المجلد المحلي مع S3 |
aws s3 sync s3://my-bucket/ ./local-folder | مزامنة S3 إلى مجلد محلي |
aws s3 rm s3://my-bucket/file.txt | احذف الملف |
aws s3 rm s3://my-bucket/ --recursive | احذف جميع الملفات في الدلو |
| أمر | وصف |
|---|
aws s3api get-bucket-versioning --bucket my-bucket | تحقق من حالة الإصدار |
aws s3api put-bucket-versioning --bucket my-bucket --versioning-configuration Status=Enabled | تمكين التنسيق التاريخي |
aws s3api get-bucket-encryption --bucket my-bucket | تحقق من التشفير |
aws s3api put-bucket-encryption --bucket my-bucket --server-side-encryption-configuration file://encryption.json | تمكين التشفير |
| أمر | وصف |
|---|
aws lambda list-functions | قائمة جميع الدوال |
aws lambda create-function --function-name my-function --runtime python3.9 --role arn:aws:iam::123456789012:role/lambda-role --handler lambda_function.lambda_handler --zip-file fileb://function.zip | إنشاء دالة |
aws lambda update-function-code --function-name my-function --zip-file fileb://function.zip | تحديث كود الدالة |
aws lambda invoke --function-name my-function output.txt | استدعاء الدالة |
aws lambda delete-function --function-name my-function | دالة الحذف |
إدارة الوظائف
| أمر | وصف |
|---|
aws lambda get-function --function-name my-function | احصل على تفاصيل الدالة |
aws lambda update-function-configuration --function-name my-function --timeout 30 | تحديث المهلة الزمنية |
aws lambda update-function-configuration --function-name my-function --memory-size 256 | تحديث الذاكرة |
aws lambda put-function-event-invoke-config --function-name my-function --maximum-retry-attempts 1 | قم بتكوين إعادة المحاولات |
| أمر | وصف |
|---|
aws iam list-users | قائمة جميع المستخدمين |
aws iam create-user --user-name myuser | إنشاء مستخدم |
aws iam delete-user --user-name myuser | حذف المستخدم |
aws iam get-user --user-name myuser | احصل على تفاصيل المستخدم |
aws iam create-access-key --user-name myuser | إنشاء مفتاح الوصول |
aws iam delete-access-key --user-name myuser --access-key-id AKIAIOSFODNN7EXAMPLE | احذف مفتاح الوصول |
إدارة المستخدمين
| أمر | وصف |
|---|
aws iam list-roles | قائمة جميع الأدوار |
aws iam create-role --role-name MyRole --assume-role-policy-document file://trust-policy.json | إنشاء دور |
aws iam attach-role-policy --role-name MyRole --policy-arn arn:aws:iam::aws:policy/AmazonS3ReadOnlyAccess | إرفاق السياسة بالدور |
aws iam detach-role-policy --role-name MyRole --policy-arn arn:aws:iam::aws:policy/AmazonS3ReadOnlyAccess | فصل السياسة عن الدور |
| أمر | وصف |
|---|
aws iam list-policies | قائمة جميع السياسات |
aws iam create-policy --policy-name MyPolicy --policy-document file://policy.json | إنشاء سياسة |
aws iam delete-policy --policy-arn arn:aws:iam::123456789012:policy/MyPolicy | سياسة الحذف |
aws iam get-policy --policy-arn arn:aws:iam::123456789012:policy/MyPolicy | احصل على تفاصيل السياسة |
| أمر | وصف |
|---|
aws cloudformation list-stacks | قائمة جميع Stacks |
aws cloudformation create-stack --stack-name my-stack --template-body file://template.yaml | إنشاء مكدس |
aws cloudformation update-stack --stack-name my-stack --template-body file://template.yaml | تحديث المكدس |
aws cloudformation delete-stack --stack-name my-stack | حذف المكدس |
aws cloudformation describe-stacks --stack-name my-stack | احصل على تفاصيل المكدس |
aws cloudformation describe-stack-events --stack-name my-stack | احصل على أحداث المكدس |
إدارة المكدسات
| أمر | وصف |
|---|
aws cloudformation validate-template --template-body file://template.yaml | تحقق من القالب |
aws cloudformation estimate-template-cost --template-body file://template.yaml | تقدير التكاليف |
aws cloudformation get-template --stack-name my-stack | احصل على قالب Stack |
| أمر | وصف |
|---|
aws rds describe-db-instances | قائمة جميع مثيلات قاعدة البيانات |
aws rds create-db-instance --db-instance-identifier mydb --db-instance-class db.t3.micro --engine mysql --master-username admin --master-user-password mypassword --allocated-storage 20 | إنشاء مثيل قاعدة البيانات |
aws rds start-db-instance --db-instance-identifier mydb | ابدأ مثيل قاعدة البيانات |
aws rds stop-db-instance --db-instance-identifier mydb | إيقاف مثيل قاعدة البيانات |
aws rds delete-db-instance --db-instance-identifier mydb --skip-final-snapshot | حذف مثيل قاعدة البيانات |
إدارة مثيلات قاعدة البيانات
| أمر | وصف |
|---|
aws rds describe-db-snapshots | قائمة جميع اللقطات |
aws rds create-db-snapshot --db-instance-identifier mydb --db-snapshot-identifier mydb-snapshot | إنشاء لقطة |
aws rds restore-db-instance-from-db-snapshot --db-instance-identifier mydb-restored --db-snapshot-identifier mydb-snapshot | استعادة من لقطة |
aws rds delete-db-snapshot --db-snapshot-identifier mydb-snapshot | احذف اللقطة |
| أمر | وصف |
|---|
aws ec2 describe-vpcs | قائمة جميع VPCs |
aws ec2 create-vpc --cidr-block 10.0.0.0/16 | أنشئ VPC |
aws ec2 delete-vpc --vpc-id vpc-12345678 | احذف VPC |
aws ec2 describe-subnets | اسرد جميع الشبكات الفرعية |
aws ec2 create-subnet --vpc-id vpc-12345678 --cidr-block 10.0.1.0/24 | إنشاء شبكة فرعية |
إدارة VPC
| أمر | وصف |
|---|
aws ec2 describe-route-tables | قوائم جداول التوجيه |
aws ec2 create-route-table --vpc-id vpc-12345678 | إنشاء جدول التوجيه |
aws ec2 create-route --route-table-id rtb-12345678 --destination-cidr-block 0.0.0.0/0 --gateway-id igw-12345678 | أضف مسار |
aws ec2 associate-route-table --subnet-id subnet-12345678 --route-table-id rtb-12345678 | جدول توجيه مرتبط |
| أمر | وصف |
|---|
aws cloudwatch list-metrics | قائمة جميع المقاييس |
aws cloudwatch get-metric-statistics --namespace AWS/EC2 --metric-name CPUUtilization --dimensions Name=InstanceId,Value=i-1234567890abcdef0 --statistics Average --start-time 2023-01-01T00:00:00Z --end-time 2023-01-02T00:00:00Z --period 3600 | احصل على إحصائيات المقاييس |
aws cloudwatch describe-alarms | قائمة جميع الإنذارات |
aws cloudwatch put-metric-alarm --alarm-name cpu-mon --alarm-description "Alarm when CPU exceeds 70%" --metric-name CPUUtilization --namespace AWS/EC2 --statistic Average --period 300 --threshold 70.0 --comparison-operator GreaterThanThreshold | أنشئ تنبيه |
السجلات
| أمر | وصف |
|---|
aws logs describe-log-groups | قائمة مجموعات السجلات |
aws logs create-log-group --log-group-name my-log-group | إنشاء مجموعة سجلات |
aws logs describe-log-streams --log-group-name my-log-group | قائمة تدفقات السجل |
aws logs get-log-events --log-group-name my-log-group --log-stream-name my-log-stream | احصل على أحداث السجل |
أفضل الممارسات
الأمان