01IAM
Tạo người dùng thực hành theo nguyên tắc tối thiểu
Tạo IAM user lab-reader, sau đó kiểm tra thông tin user.
Lời giải
$ aws iam create-user --user-name lab-reader$ aws iam get-user --user-name lab-readerChạy trong môi trường mô phỏng; cú pháp bám sát AWS CLI v2. Không có lệnh nào gọi AWS thật.
Tạo IAM user lab-reader, sau đó kiểm tra thông tin user.
$ aws iam create-user --user-name lab-reader$ aws iam get-user --user-name lab-readerTạo bucket tên duy nhất tại ap-southeast-1 và kiểm tra danh sách bucket.
$ aws s3api create-bucket --bucket my-unique-lab-bucket --region ap-southeast-1 --create-bucket-configuration LocationConstraint=ap-southeast-1$ aws s3 lsTạo một instance t3.micro từ AMI đã biết, sau đó xem trạng thái instance.
$ aws ec2 run-instances --image-id ami-0123456789abcdef0 --instance-type t3.micro --count 1$ aws ec2 describe-instancesVới instance ID i-0123456789abcdef0, dừng rồi khởi động lại máy.
$ aws ec2 stop-instances --instance-ids i-0123456789abcdef0$ aws ec2 start-instances --instance-ids i-0123456789abcdef0Tạo bảng Users với partition key userId kiểu string, chế độ on-demand.
$ aws dynamodb create-table --table-name Users --attribute-definitions AttributeName=userId,AttributeType=S --key-schema AttributeName=userId,KeyType=HASH --billing-mode PAY_PER_REQUEST$ aws dynamodb describe-table --table-name UsersLiệt kê các Lambda function và xem cấu hình function hello-lab.
$ aws lambda list-functions$ aws lambda get-function --function-name hello-labLiệt kê VPC và subnet có sẵn trong Region đang chọn.
$ aws ec2 describe-vpcs$ aws ec2 describe-subnetsLiệt kê CloudWatch alarms hiện có để rà soát giám sát.
$ aws cloudwatch describe-alarms