Storage buckets in CloudNexus are fundamental containers for your unstructured data. This guide covers everything you need to know about provisioning, configuring, and securing buckets for production workloads.

Prerequisites

  • An active CloudNexus account with Developer or higher permissions
  • CloudNexus CLI installed (cnx --version >= 2.4.0)
  • Valid API credentials (CNX_API_KEY & CNX_SECRET)

Create via Console

The easiest way to provision a bucket is through the CloudNexus Web Console:

  1. Navigate to StorageBuckets in the left sidebar
  2. Click the + Create Bucket button in the top-right corner
  3. Enter a globally unique bucket name (e.g., app-assets-prod)
  4. Select your target Region (e.g., us-east-1, eu-west-1)
  5. Configure access controls: Private (default), Public, or Authenticated
  6. Toggle optional features: Versioning, Lifecycle Policies, or Cross-Region Replication
  7. Click Create Bucket. Provisioning takes ~5 seconds.
💡 Tip: Bucket names must be globally unique across CloudNexus. Use hyphens instead of underscores, and avoid sequential numbers to prevent collision errors.

Create via CLI

For automation and Infrastructure-as-Code workflows, use the CloudNexus CLI:

Terminal
cnx storage bucket create my-app-assets \
  --region us-east-1 \
  --visibility private \
  --versioning enabled \
  --encryption AES256 \
  --lifecycle delete-after-30d

This returns a JSON response containing the bucket ARN, endpoint URL, and metadata. You can pipe this output into your CI/CD pipeline or configuration management tool.

Create via REST API

Make a POST request to the storage API endpoint:

API Request
curl -X POST https://api.cloudnexus.io/v1/storage/buckets \
  -H "Authorization: Bearer $CNX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "data-lake-backups",
    "region": "eu-west-1",
    "access": "private",
    "versioning": true,
    "tags": {
      "environment": "production",
      "team": "data-eng"
    }
  }'

Configure Lifecycle & Permissions

Once created, apply lifecycle rules to optimize costs and manage data retention:

CLI: Apply Lifecycle Policy
cnx storage lifecycle put my-app-assets \
  --rule "archive-after-90d,delete-after-365d"
⚠️ Important: Bucket names cannot be changed after creation. If you need a different name, you must migrate data to a new bucket and update your application configurations.

Best Practices

  • Region Selection: Always deploy buckets in the same region as your application servers to minimize latency and cross-region data transfer costs.
  • Access Control: Default to private. Use CloudNexus IAM policies to grant granular GET, PUT, or DELETE permissions to specific service roles.
  • Encryption: Enable server-side encryption (SSE-KMS or AES256) for compliance with SOC2, HIPAA, and GDPR requirements.
  • Versioning: Enable versioning for critical assets to protect against accidental deletions or overwrites. Combine with lifecycle rules to manage storage costs.
  • Monitoring: Enable CloudNexus Metrics for your bucket to track requests, bandwidth usage, and error rates via the Observability dashboard.

Next Steps

Now that your bucket is provisioned, explore these guides to integrate it into your architecture: