Nội dung
Bạn hãy tạo access key và secret access key cho user awsstudent được tạo ra bởi Cloud Formation Template trong phần chuẩn bị và dùng nó để cấu hình cho awscli nhé. Đồng thời hãy truy cập vào giao diện quản lý IAM , chọn IAM User awsstudent, chọn Permissions, Add permissions|Attach existing policy directly và chọn AdministratorAccess
aws configure set profile.aws-lab-env.region <your-region>
aws configure set profile.aws-lab-env.aws_access_key_id <your_access_key_id>
aws configure set profile.aws-lab-env.aws_secret_access_key <your_secret_access_key>
Bạn cần cài đặt 2 buckets. Một bucket sẽ chứa hàm lambda được tải lên và một bucket được sử dụng để lưu trữ hình ảnh.
aws s3 mb s3://idevelop-sourcecode-<yourinitials> --region <region> --profile aws-lab-env
trong đó là tên duy nhất cho bucket của bạn . Thay thế với region phù hợp với bài thực hành của bạn.
aws s3 mb s3://idevelop-imagemanager-<yourinitials> --region <region> --profile aws-lab-env
Sau khi hoàn tất hai bước trên, bạn sẽ có 2 S3 bucket tương tự như hình dưới đây.