AWS基礎命令操作

2021-09-12 13:07:52 字數 1060 閱讀 9259

aws s3 ls 列出aws上的桶

aws s3 ls s3://bucket 列出桶下的目錄及物件

aws s3 ls s3://bucket/path 列出桶下的path的物件

高階別 aws s3 命令還可以方便地管理 amazon s3 物件。這些物件命令包括 aws s3 cp、aws s3 ls、aws s3 mv、aws s3 rm 和 sync。cp、ls、mv 和 rm 命令的用法與linux中的對應命令相同,sync 命令同步乙個儲存桶與乙個目錄或兩個儲存桶中的內容。

注意:如果物件很大,所有涉及向 amazon s3 儲存桶(aws s3 cp、aws s3 mv 和 aws s3 sync)上傳物件的高階別命令都會自動執行分段上傳。

cp、mv和sync包括乙個–grants選項,可用來向指定使用者或組賦予對物件的許可權。

–grants permission=grantee_type=grantee_id

[permission=grantee_type=grantee_id …]

permission:指定授予的許可權,可以設定read、readacl、writeacl 或 full。

grantee_type:指定被授權者的標識方法,可以設定為uri、emailaddress或id

grantee_id:根據grantee_type指定被授權者。

uri 組url

emailaddress 賬戶的電子郵件位址

id 賬戶的規範

例:aws s3 cp file.txt s3://my-bucket/ –grants read=uri= [email protected]

cp file.txt到aws下的my-bucket桶下,給的許可權是所有人讀許可權,[email protected]所有許可權

要上傳到s3的物件指定非預設儲存類(reduced_redundancy或standard_ia

)請使用storage-class選項

例:aws s3 cp file.txt s3://mybucket/ –storage-class reduced_redundancy

AWS基礎架構

要求 1 建立vpc,建立子網 2 開通ec2,部署基礎wordpress站點 可自己部署,也可使用社群ami ec2放在不同可用區 3 開通rds多可用區例項,作為wordpress後端資料庫 3 制定ec2自動快照的策略 4 配置負載均衡,能夠通過負載均衡訪問wordpress 5 ec2掛載s...

AWS基礎知識

兩種儲存 ebs elastic block storage instance storage重啟不會丟失資料,關機丟失資料 相關操作 relaunch terminate launch 3.關於dns 弄清楚一級網域名稱 二級網域名稱 頂級域,根域以及dns工作原理。如edu.cn.表示二級網域名...

在Linux下安裝aws命令列操作

使用安裝包安裝 環境 檢查python版本 2 解壓壓縮包 unzip awscli bundle.zip 3 執行安裝,並生成可執行檔案 sudo awscli bundle install i usr local aws b usr local bin aws sudo usr local bi...