--- title: "view create-s3cors-configuration" slug: "view-create-s3cors-configuration" tags: ["5.5"] updated: 2026-10-27T23:00:54Z published: 2026-10-27T23:00:54Z canonical: "docs.vastdata.com/view-create-s3cors-configuration" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.vastdata.com/llms.txt > Use this file to discover all available pages before exploring further. # view create-s3cors-configuration This command creates a [CORS](/docs-5-5/docs/s3-cors) configuration for a view that exposes an S3 bucket. ## Usage ```plaintext view create-s3cors-configuration --id ID                                [--cors-configuration-file FILEPATH|--cors-configuration STRING] ``` ## Required Parameters | `--id ID` | The ID of the view for which the CORS configuration is created. | | --- | --- | ## Options | `--cors-configuration-file FILEPATH` | This option lets you specify a file path to upload a JSON file that contains CORS rules. | | --- | --- | | `--cors-configuration STRING` | Use this option to supply [CORS rules in JSON format](/docs-5-5/docs/s3-cors#cors-rules) on the command line. | ## Example To upload a CORS configuration from a file: ```plaintext vcli: admin> view create-s3cors-configuration --id 31 ----cors-configuration-file path/to/configuration_file.json ``` To create a CORS configuration from the command line: ```plaintext vcli: admin> view create-s3cors-configuration --id 5 --cors-configuration '{    "cors_rules": [        {            "allowed_origins": ["http://example.com"],            "allowed_methods": ["GET", "HEAD"],            "allowed_headers": ["Content-MD5"],            "expose_headers": ["x-amz-server-side-encryption"],            "max_age_seconds": 3600        },        {            "allowed_origins": ["*"],            "allowed_methods": ["DELETE"]        }    ] }' ``` To create a CORS configuration from the command line in AWS format: ```plaintext vcli: admin> view create-s3cors-configuration --id 4 --cors-configuration '{    "aws_cors_rules": [        {            "AllowedOrigins": ["https://example.com"],            "AllowedMethods": ["GET", "PUT"],            "AllowedHeaders": ["*"],            "ExposeHeaders": ["ETag", "x-amz-server-side-encryption"],            "MaxAgeSeconds": 3600        }    ] }' ```