--- title: "put-object" slug: "cli-objectstorage-api-level-put-object" updated: 2026-10-08T05:01:37Z published: 2026-10-08T05:01:37Z canonical: "cli.ncloud-docs.com/cli-objectstorage-api-level-put-object" --- > ## Documentation Index > Fetch the complete documentation index at: https://cli.ncloud-docs.com/llms.txt > Use this file to discover all available pages before exploring further. # put-object Available in Classic and VPC Store an object in Object Storage. ## Syntax The `put-object` syntax is as follows: ``` aws s3api put-object \ --bucket \ --key \ [--body ] \ [--cache-control ] \ [--content-disposition ] \ [--content-encoding ] \ [--content-language ] \ [--content-length ] \ [--content-md5 ] \ [--content-type ] \ [--metadata ] \ [--storage-class ] \ [--server-side-encryption ] \ [--sse-customer-algorithm ] \ [--sse-customer-key ] \ [--sse-customer-key-md5 ] \ [--object-lock-mode ] \ [--object-lock-retain-until-date ] \ [--object-lock-legal-hold-status ] \ --endpoint-url ``` ## Options This section describes the options available when running `put-object`. ### Required options The following options are required for `put-object`. | Options | Type | Required | Description | | --- | --- | --- | --- | | `--bucket` | String | Required | Bucket name | | `--key` | String | Required | Object name | ### Optional options These are the optional options for `put-object`. Options that are not specified will use their default values. | Options | Type | Required | Description | | --- | --- | --- | --- | | `--body` | String | Optional | Path or file of the object | | `--cache-control` | String | Optional | Caching behavior | | `--content-disposition` | String | Optional | Display format of requested data | | `--content-encoding` | String | Optional | Encoding format of requested data | | `--content-language` | String | Optional | Request data language | | `--content-length` | Long | Optional | Request data size (byte) | | `--content-md5` | String | Optional | Base64-encoded 128-bit MD5 hash of the request data - Used to validate the integrity of the request data - Calculated automatically if not entered | | `--content-type` | String | Optional | Request data format. | | `--metadata` | String | Optional | Metadata to be stored with the object | | `--storage-class` | String | Optional | Storage class - `STANDARD` (default) \| `ONEZONE_IA` \| `DEEP_ARCHIVE` - `STANDARD`: Standard Class - `ONEZONE_IA`: One Zone-IA (Infrequent Access) Class - `DEEP_ARCHIVE`: Archive Class | | `--server-side-encryption` | String | Optional | Server-side encryption method - `AES256` \| `aws:kms` - `AES256`: SSE-S3 (server management key) - `aws:kms`: SSE-KMS (KMS management key) | | `--sse-customer-algorithm` | String | Optional | User encryption algorithm (AES256) | | `--sse-customer-key` | String | Optional | User-provided encryption key | | `--sse-customer-key-md5` | String | Optional | User-provided encryption key's MD5 value | | `--object-lock-mode` | String | Optional | Object retention mode - `GOVERNANCE` \| `COMPLIANCE` - `GOVERNANCE`: Can be bypassed with special permissions. - `COMPLIANCE`: No one can bypass it. - Specify with `--object-lock-retain-until-date`. - Available only in buckets with object lock enabled. | | `--object-lock-retain-until-date` | String | Optional | Object retention expiration date - ISO 8601 format. - Specify with `--object-lock-mode`. - Available only in buckets with object lock enabled. | | `--object-lock-legal-hold-status` | String | Optional | Legal hold status - `ON` \| `OFF` - Available only in buckets with object lock enabled | ### Common options For information about the options common to all `aws` subcommands, see [Object Storage options](/docs/en/guide-objectstorage#%EC%98%B5%EC%85%98). ## Examples If the object upload request is successful, the object's identification information is returned. ### Command The command example is as follows: ``` aws s3api put-object --bucket my-test-bucket \ --key img/image.png \ --body image.png \ --endpoint-url=https://kr.object.ncloudstorage.com ``` ### Output The output example is as follows: ``` { "ETag": "\"2cd8bde463f5d82aae0f0cec061d6b8f\"" } ```