0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

localstack S3 に標準入力した内容のオブジェクトを置くワンライナー

Posted at

チートシート

echo '【オブジェクトの中身】' | docker exec --interactive 【コンテナ名】 awslocal s3 cp - s3://【バケット名】/【オブジェクトのパス】

ポイント

1. docker exec --interactive

アタッチしていなくても、標準入力を開き続ける

docker exec — Docker-docs-ja 24.0 ドキュメント より引用

2. s3 cp -

s3 cp コマンドでは、次の構文を使用して、stdin から指定先のバケットにファイルストリームをアップロードします。

$ aws s3 cp - <target> [--options]

Using high-level (s3) commands in the AWS CLI - AWS Command Line Interface より引用

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?