AWS CLI S3 Cheat Sheet/Upload an object with s3api

Put a single object using low-level API options.

Section: S3API Object Commands

Upload an object with s3api

bash
bash
aws s3api put-object --bucket my-bucket --key docs/readme.txt --body ./README.md
Explanation

Useful when you need API-level options not exposed in high-level `aws s3` commands.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing S3API Object Commands
Download an object with s3api
Fetch an object to a local file.
OpenIn sheetbashsame section
Read object metadata
Inspect metadata for a specific object.
OpenIn sheetbashsame section
Copy an object
Copy an object within S3 using low-level API syntax.
OpenIn sheetbashsame section
Delete an object with s3api
Delete a single object by key.
OpenIn sheetbashsame section
List object versions
Show versions in a versioned bucket.
OpenIn sheetbashsame section
Delete a specific object version
Remove one version from a versioned bucket.
OpenIn sheetbashsame section