目次
準備
- AWS CLIの設定を終えているPowershell(aws configureが設定されているか)
Amazon S3 (Amazon Simple Storage Service)
Amazon S3は業界をリードするスケーラビリティ、データ可用性、セキュリティ、およびパフォーマンスを提供するオブジェクトストレージサービスです。
AWS CLIコマンドチートシート
Amazon S3をACLがインストールしているPowershellで操作する。
コマンド | 説明 | 例 |
aws s3 ls s3://(S3 Dirctory Path) | S3内のファイルとディレクトリを表示する | PS> aws s3 ls s3://testdir |
aws s3 sync (Local File Path) s3://(S3File Path) | local fileを(S3File Path) に同期 バイトで差分がある場合に同期する。 |
PS>aws s3 sync C:\Users\hogehoge/ s3://testdir/ |
aws s3 sync (Local File Path) s3://(S3File Path) –exact-timestamps |
タイムスタンプでの同期が可能 |
PS>aws s3 sync C:\Users\hogehoge/ s3://testdir/ –exact-timestamps |
aws s3 rm s3://(S3File Path) | (S3File Path)のファイルを削除 | aws s3 rm s3://testdir/hohoge.txt |
aws s3 mv (Local File Path) s3://(S3 directory Path) | LocalFileをS3に移動 切り取りとしても使用可能 |
aws s3 mv C:\Users\hogehoge/hohoge.txt s3://testdir/ |
aws s3 cp (Local File Path) s3://(S3File Path) | (Local File)を(S3File Path)にコピー | aws s3 cp (C:\Users\hogehoge/hohoge.txt s3://testdir/hohoge.txt |
aws s3 cp (Local Dirctory Path) s3://(S3Dirctory Path) –recursive | (Dirctory)にあるファイルを(S3File Path)に すべて再帰的にコピーする。 |
aws s3 cp (C:\Users\hogehoges3://testdir –recursive |
コメント