鐵人賽
AWS
S3
Outposts
S3 Bucket
當你已擁有一個隸屬於 AWS Outposts 組織下的帳號,並且被共享了相關資源後⋯⋯
建 Bucket
, 建 Access Point
, 建 Endpoint
, 開心使用
s3control
指令文件連結
以 Outpost Owner 身份,建立 S3 on Outposts bucket
aws s3control create-bucket \
--bucket nipapa-dev-s3-bucket \
--outpost-id op-xxxxxxxxxxxx \
--profile xxx
Outpost Owner
在 Outpost 上建立 Bucket;
*目前尚不支援透過 RAM 分享這個建立權限給 Linked Account
以 Outpost Owner 身份,建立 Access Point for an S3 on Outposts bucket 輸入指令
arn:aws:s3:<region>:<account-id>:<access-point-name>
VPC
和 AWS
(也就是 S3 Bucket on Outpost)aws s3control create-access-point \
--account-id 111111111111<outpost owner> \
--name nipapa-dev-s3-bucket \
--bucket "arn:aws:s3-outposts:ap-northeast-1:111111111111:outpost/op-xxxxxxxxxxxx/bucket/nipapa-dev-s3-bucket" \
--vpc-configuration VpcId=vpc-1234567890abcedf0 \
--profile xxx
{
"AccessPointArn": "arn:aws:s3-outposts:ap-northeast-1:111111111111:outpost/op-xxxxxxxxxxxx/accesspoint/nipapa-dev-s3-bucket"
}
(END)
{
"AccessPointArn": "arn:aws:s3-outposts:ap-northeast-1:111111111111:outpost/op-xxxxxxxxxxxx/accesspoint/boss-seop-accesspoint"
}
(END)
aws s3control list-access-points \
--account-id 111111111111 \
--bucket "arn:aws:s3-outposts:ap-northeast-1:111111111111:outpost/op-xxxxxxxxxxxx/bucket/nipapa-dev-s3-bucket" \
--profile xxx
aws s3control delete-access-point \
--account-id 111111111111 \
--name "arn:aws:s3-outposts:ap-northeast-1:111111111111:outpost/op-xxxxxxxxxxxx/accesspoint/boss-seop-accesspoint" \
--profile xxx
aws s3control create-access-point \
--account-id 111111111111 \
--name boss-s3op-accesspoint \
--bucket "arn:aws:s3-outposts:ap-northeast-1:111111111111:outpost/op-xxxxxxxxxxxx/bucket/nipapa-dev-s3-bucket" \
--vpc-configuration VpcId=vpc-1234567890abcedf0 \
--profile xxx
{
"AccessPointArn": "arn:aws:s3-outposts:ap-northeast-1:111111111111:outpost/op-xxxxxxxxxxxx/accesspoint/boss-s3op-accesspoint"
}
(END)
建立 Endpoint on an Outpost
Endpoint
啊!aws s3outposts create-endpoint \
--outpost-id op-xxxxxxxxxxxx \
--subnet-id subnet-0341959a4ebef5b98 \
--security-group-id sg-02a2747f6477e0783 \
--profile xxx
aws s3outposts create-endpoint --outpost-id op-xxxxxxxxxxxx --subnet-id subnet-0341959a4ebef5b98 --security-group-id sg-02a2747f6477e0783
操作 S3 Objects
s3api
操作,以下列出資料作為範例 aws s3api list-objects-v2 --bucket "arn:aws:s3-outposts:ap-northeast-1:111111111111:outpost/op-xxxxxxxxxxxx/accesspoint/nipapa-dev-s3-bucket" --profile xxx