Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: DOC-2783

Include Page
INCL:_RC-OSU-Warning-EndOfLife
INCL:_RC-OSU-Warning-EndOfLife


Panel
bgColor#F6F5F5
borderWidth0

You can upload a local object to a bucket to store it and create a backup in the Cloud, and possibly share it with other users.

Include Page
INCL:_RC-OS-para-UploadObject
INCL:_RC-OS-para-UploadObject

You cannot change the key of an object once it is uploaded in the bucket. If you upload an object with the same key as another object already contained in the bucket, this object you upload replaces the former object. If the bucket versioning is enabled, the former object is conserved as a previous version. For more information, see Enabling or Disabling Bucket Versioning.

By default, the objects you upload are private. However, you can share the objects that you uploaded in your bucket with other users setting an Access Control List (ACL). For more information, see Access Control List (ACL) Reference.

This action also returns an ETag element that you need to create a multipart-upload. For more information, see Creating a Multipart Upload.

Include Page
INCL:_RC-OS-Warning-DataPrivacy
INCL:_RC-OS-Warning-DataPrivacy

Include Page
INCL:_RC-General-Sent-CockpitNotAvailable
INCL:_RC-General-Sent-CockpitNotAvailable



Panel
borderColor#FFFFFF
bgColor#F6F5F5
borderWidth2
titleBGColor#E6E6E6
borderStylesolid
titleRelated Pages



  • To upload a local object to a bucket, use the put-object command following this syntax:

    Code Block
    languagetext
    titleRequest sample
    $ aws s3api put-object \
        --profile YOUR_PROFILE \
        --bucket BUCKET \
        --key OBJECT \
        --body usr/bin/YOUR_OBJECT \
        --acl private \
        --content-length 42 \
        --grant-full-control "id=123456789012USER_ID, id=987654321098USER_ID" \
        --grant-read "id=123456789012USER_ID, id=987654321098USER_ID" \
        --grant-read-acp "id=123456789012USER_ID, id=987654321098USER_ID" \
        --grant-write-acp "id=123456789012USER_ID, id=987654321098USER_ID" \
        --endpoint ENDPOINT

    Include Page
    INCL:_RC-General-SentPart-AWSCLIattributes
    INCL:_RC-General-SentPart-AWSCLIattributes

    • Include Page
      INCL:_RC-General-SentPart-AWSCLIProfile
      INCL:_RC-General-SentPart-AWSCLIProfile
    • bucket: The bucket in which you want to upload the object.
    • key: The name you want to give to your object in the bucket.
      Include Page
      INCL:_RC-OS-Tip-Prefixes
      INCL:_RC-OS-Tip-Prefixes
    • body: The path to the object on your machine.
      Include Page
      INCL:_RC-OS-Important-ACLRules
      INCL:_RC-OS-Important-ACLRules
    • (optional) acl: The permissions you grant for your object (private | public-read | public-read-write | authenticated-read | bucket-owner-read | bucket-owner-full-control).
    • (optional) content-length: If the size cannot be defined automatically, the size of the object, in bytes.
    • (optional) grant-full-control: One or more account more IDs of users to users to whom you grant the full-control permission.

    • (optional) grant-readOne or more account IDs of users to users to whom you grant the read permission.
    • (optional) grant-read-acp: One or more account more IDs of users to users to whom you grant the read-acp permission.
    • (optional) grant-write-acp: One or more account more IDs of users to users to whom you grant the write-acp permission.
      Include Page
      INCL:_RC-OS-Important-ACLRulesGrantID
      INCL:_RC-OS-Important-ACLRules
      Include Page
      INCL:_RC-OS-Note-ACLRulesINCL:_RC-OS-Note-ACLRulesGrantID
    • Include Page
      INCL:_RC-OS-SentPart-AWSCLIEndpoint
      INCL:_RC-OS-SentPart-AWSCLIEndpoint

 The put-object command returns the following element:

    • ETag: The ETag of your object, that you need to use the multipart upload commands. For more information, see Creating a Multipart Upload.

    Code Block
    languagetext
    titleResult sample
    {
        "ETag": "\"fae0000b0d0000fababdd00e0a000000\""
    }

    The object is uploaded to the bucket. 
     


  • Tip
    • Include Page
      INCL:_RC-OS-TipMessage-s3Command
      INCL:_RC-OS-TipMessage-s3Command

      Code Block
      languagetext
      $ aws s3 cp --profile YOUR_PROFILE LOCAL_PATH/OBJECT_TO_UPLOAD s3://YOUR_BUCKET --endpoint ENDPOINT


    • Include Page
      INCL:_RC-OS-Sent-s3cmdCommand
      INCL:_RC-OS-Sent-s3cmdCommand




Panel
borderColor#FFFFFF
bgColor#F6F5F5
borderWidth2
titleBGColor#E6E6E6
borderStylesolid
titleTutorial: Setting Up a Bucket with Objects

Previous Step:

(optional) Configuring a Bucket ACL

Next Step:

(optional) Configuring an Object ACL


Panel
borderColor#FFFFFF
bgColor#F6F5F5
borderWidth2
titleBGColor#E6E6E6
borderStylesolid
titleTutorial: Copying an OMI Across Different Regions (API)

Previous Step:

Creating a Manifest File for an Image Export Task

Next Step:

Configuring a Pre-signed URL


Include Page
INCL:_RC-General-Panel-AWSLegalMentions
INCL:_RC-General-Panel-AWSLegalMentions