Truy cập AWS Management Console
Trong giao diện VPC
Trong giao diện Create endpoint
S3-Endpoint
Trong các service, chúng ta tìm S3
Tạo VPC endpoint thành công
Truy cập vào S3 bucket
Trong giao diện bucket
{
"Statement": [
{
"Action": "s3:*",
"Effect": "Deny",
"Resource": "arn:aws:s3:::BUCKET_NAME/*",
"Condition": {
"StringNotEquals": {
"aws:sourceVpce": "VPC_ENDPOINT_ID"
}
},
"Principal": "*"
}
]
}
- Thay thế **BUCKET NAME** và **VPC ENDPOINT ID** của bạn.
aws s3api head-object --key app1/file1 --profile user1 --bucket ${bucket}
Quay lại giao diện VPC endpoint
Trong giao diện Manage route tables
aws s3api head-object --key app1/file1 --profile user1 --bucket ${bucket}