Repository navigation
LAB 16 ‐ Object Storage Configuration
Object Storage in Oracle Cloud Infrastructure (OCI) is a highly scalable, durable, and cost-effective storage service used to store large amounts of unstructured data such as images, videos, backups, logs, and documents.
Data is stored as objects inside buckets, instead of traditional file systems.
-
Bucket
A logical container that stores objects. -
Object
The actual file/data (e.g.,.zip,.jpg,.log). -
Namespace
A unique identifier assigned to each OCI tenancy. -
Storage Tier
- Standard (frequent access)
- Archive (rare access, lower cost)
- Highly durable and scalable
- Secure access using IAM policies
- Lifecycle management (auto move to archive)
- Accessible via Console, CLI, SDK, and API
-
Bucket Name:
app-backups -
Object:
backup-01.zip - Use: Store daily backups of your application
- Bucket = Folder (like Google Drive)
- Object = File
- Backup and restore
- Media storage (images/videos)
- Logs and analytics data
- Static website hosting
Object Storage in OCI allows you to store unlimited unstructured data securely and cost-effectively. It is ideal for backups, media storage, and long-term data retention.
A Pre-Authenticated Request (PAR) in Oracle Cloud Infrastructure (OCI) allows you to grant access to objects in Object Storage without requiring users to log in or have IAM permissions.
It generates a unique URL that can be shared with others to access specific resources securely.
- Provides temporary access via a URL
- No OCI login required
- Can be time-limited (expiry date)
- Supports read, write, or read/write access
- Can be created for a single object or entire bucket
- Object Read → Download a specific file
- Object Write → Upload a file
- Object Read/Write → Both upload and download
- Bucket Access → Access all objects in a bucket
- Object:
report.pdf - Create PAR with Read Access
- Share generated URL with user
➡️ User can download the file without logging into OCI
- Share files without IAM access
- Temporary file uploads
- External user access
- Secure download links
💼 Real-Time Scenarios (Very Important)
- Client File Sharing
You need to send a report to a client:
Upload file to Object Storage Create PAR (Read access) Share URL
➡️ Client downloads file without OCI login
Pre-Authenticated Request (PAR) in OCI is a simple and secure way to share Object Storage resources using a temporary URL without requiring user authentication.
A Retention Rule in Oracle Cloud Infrastructure (OCI) Object Storage is used to prevent objects from being modified or deleted for a specified period of time.
It ensures data protection by enforcing a write-once-read-many (WORM) model.
- Protect critical data from accidental deletion
- Meet compliance and regulatory requirements
- Ensure data integrity
- Prevent unauthorized modifications
- Time-based data protection
- Applies at the bucket level
- Objects cannot be deleted or overwritten during retention period
- Supports governance and compliance use cases
-
Time-Bound Retention
Objects are locked for a specific duration (e.g., 30 days, 1 year) -
Indefinite Retention
Objects are locked until the rule is manually removed (if allowed)
- Bucket:
finance-records - Retention Rule: 90 days
➡️ Any file uploaded cannot be deleted or modified for 90 days
- Once applied, objects cannot be deleted or modified until retention expires
- Retention rules can impact cost (data stays longer)
- Be careful while enabling — cannot be easily bypassed
- Financial records
- Legal documents
- Audit logs
- Backup data requiring protection
Retention Rule in OCI is used to lock objects for a defined period, ensuring data cannot be deleted or modified, which helps in compliance and data protection.
In Oracle Cloud Infrastructure (OCI) Object Storage:
- Lifecycle Policy is used to manage objects automatically (move/delete)
- Retention Rule is used to protect objects from deletion/modification
Both serve completely different purposes.
- Lifecycle Policy → Data Management (Automation)
- Retention Rule → Data Protection (Locking)
| Feature | Lifecycle Policy | Retention Rule |
|---|---|---|
| Purpose | Manage object lifecycle | Protect data |
| Action | Move/Delete objects | Prevent delete/modify |
| Control Type | Automatic | Restrictive (Lock) |
| Use Case | Cost optimization | Compliance & security |
| Flexibility | Can modify anytime | Limited changes |
| Deletion Allowed | Yes (as per rule) | Not allowed during retention |
| Level | Bucket level | Bucket level |
Lifecycle Policy automatically performs actions like:
- Move objects to Archive tier
- Delete objects after specific days
- Move files to Archive after 30 days
- Delete files after 90 days
➡️ Helps reduce storage cost
Retention Rule locks objects for a specific duration.
- Retention: 60 days
➡️ Objects cannot be deleted or modified for 60 days
Use Lifecycle Policy
➡️ Move old backups to Archive to save cost
Use Retention Rule
➡️ Prevent deletion of important records
If both are applied:
- Retention Rule overrides Lifecycle Policy
➡️ Even if lifecycle says "delete", object will NOT delete until retention expires
- Use Lifecycle Policy for automation and cost saving
- Use Retention Rule for data protection and compliance
Click on the Burger Menu in left side, select storage than go to the object storage & archive storage.
Click on create Bucket, Fill in all the details required to create a bucket
**A bucket in Oracle Cloud Infrastructure (OCI) is like a folder in the cloud where you can store your files — things like photos, videos, documents, or backups. **
Now Bucket is created .
Scroll down to the left side of the bucket. Under Resources, select Objects, and then click Upload
And your object(file) is now uploaded.
pre-authenticated request (PAR) for a bucket in Oracle Cloud Infrastructure (OCI), you're basically giving someone a special link that lets them interact with that bucket — without needing to log in.
Under Resources, select Pre-Authenticated request, and then click Create Pre-Authenticated request
"After clicking on Create Pre-Authenticated Request, a tab will appear on the screen containing a Pre-Authenticated Request URL address. You need to copy and save that URL because it will not be shown again.
Just share this URL with the person you want to give access to for that particular object. They only need to copy that address and paste it into Google to open the object. They can execute read/write actions depending on the access type given to them
file will open
A lifecycle rule in a bucket (like in Oracle Cloud Infrastructure) is a way to automatically manage your files over time — kind of like setting up a cleaning schedule for your digital storage.
This could be:
- Move to archive (for long-term, cheaper storage)
- Delete (to free up space)
- Move to infrequent access (if you don’t use the file often) In the screen below, you can see that Auto-Tiering is enabled
A retention rule in an OCI bucket is like putting a “do not delete or change” sticker on your files — for a set amount of time.
-
During that time, nobody can delete or change those files — not even admins.
-
You can choose between: (a) Time-bound rules (e.g. keep for 90 days) (b) Indefinite rules (keep forever until you remove the rule) And if you lock the rule, it becomes permanent — even Oracle Support can’t undo it. So it’s powerful, but you’ve got to use it carefully.
Under Resources, select Retention rule, and then click Create rule. fill all the details and click create
Now Retention rule is created