15_1 ‐ OCI Object Storage: Bucket, Uploads, Pre‐Auth & Lifecycle - SanjeevOCI/Ocidocs GitHub Wiki

15 - OCI Object Storage: Bucket, Uploads, Pre-Auth & Lifecycle

Applies to: OCI Object Storage service
Goal: Create a bucket, upload objects, generate a pre-authenticated URL, and configure lifecycle & retention rules.


✅ Prerequisites

  • OCI tenancy with permissions for Object Storage (create buckets, policies)
  • A file (e.g. text/image) to upload
  • Understanding of bucket tiers, lifecycle rules, IAM policies

🗂 Table of Contents

  1. Create Bucket
  2. Upload Objects
  3. Create Pre-Authenticated Request (PAR)
  4. Configure Lifecycle & Retention Rules
  5. Policies for Lifecycle Access
  6. Summary
  7. References

1. Create Bucket

  1. ☰ → StorageObject Storage & Archive Storage
  2. Click Create Bucket
  3. Fill in:
    • Name: e.g. Test_Bucket
    • Tier: Standard / Archive
    • Enable Auto-Tiering (optional)
    • Enable Object Versioning if needed
  4. Click Create

![Create Bucket menu](https://github.com/user-attachments/assets/ Object_Storage_Configuration_1)
Figure 1. Navigate to Object Storage service

![Bucket form](https://github.com/user-attachments/assets/ Object_Storage_Configuration_2)
Figure 2. Fill bucket details

![Bucket created](https://github.com/user-attachments/assets/ Object_Storage_Configuration_4)
Figure 3. Bucket “Test_Bucket” created


2. Upload Objects

  1. Inside the bucket, go to Resources → Objects
  2. Click Upload
  3. Drop files (text, image, etc.) or browse
  4. Upload completes and objects appear in list

![Upload objects interface](https://github.com/user-attachments/assets/ Object_Storage_Configuration_6)
Figure 4. Upload objects interface

![Files uploaded](https://github.com/user-attachments/assets/ Object_Storage_Configuration_9)
Figure 5. Objects listed inside bucket


3. Create Pre-Authenticated Request (PAR)

  1. Under Resources → Pre-Authenticated Request, click Create PAR
  2. Select Target = Object, choose the object, set expiration and access type (Read / Write)
  3. Click Create
  4. Copy and save the PAR URL (shown once, retain it)

![PAR creation](https://github.com/user-attachments/assets/ Object_Storage_Configuration_10)
Figure 6. Create PAR screen

![PAR copy URL](https://github.com/user-attachments/assets/ Object_Storage_Configuration_12)
Figure 7. URL shown for the PAR

  1. Share this URL — the recipient can access the object per assigned permissions

4. Configure Lifecycle & Retention Rules

  1. While Auto-Tiering is enabled by default, disable it if you want manual rules
  2. Go to Resources → Lifecycle Policy Rules → Create Rule
  3. After disabling auto-tiering, you can select actions like Move to Infrequent Access and set days
  4. Save the lifecycle rule

![Auto-tiering disabled](https://github.com/user-attachments/assets/ Object_Storage_Configuration_16)
Figure 8. Disable Auto-Tiering first

![Create lifecycle rule](https://github.com/user-attachments/assets/ Object_Storage_Configuration_19)
Figure 9. Configure lifecycle rule

  1. For Retention Rule, go to Resources → Retention Rules → Create and set the retention period

![Retention rule setup](https://github.com/user-attachments/assets/ Object_Storage_Configuration_28)
Figure 10. Retention rule configuration


5. Policies for Lifecycle Access

If you see InsufficientServicePermissions error when creating lifecycle rules:

  1. ☰ → Identity & Security → Policies → Create Policy
  2. Add policy like:
Allow service objectstorage-<region> to manage object-family in compartment <CompartmentName>
  1. Save the policy
  2. Return to the bucket and reattempt lifecycle rule creation

![Policy creation](https://github.com/user-attachments/assets/ Object_Storage_Configuration_22) Figure 11. IAM policy setup for access

✅ Summary

In this lab, you learned to:

  • Create an Object Storage bucket in OCI
  • Upload objects (files, images) to the bucket
  • Generate a Pre-Authenticated URL to access an object
  • Configure Lifecycle & Retention rules, and disable Auto-Tiering
  • Use IAM policies to grant Object Storage service rights for lifecycle management

This lab helps you build real-world backup, archival, data sharing, and lifecycle automation using OCI’s object storage features.

⚠️ **GitHub.com Fallback** ⚠️