Cloud

CREATE STORAGE

The CREATE STORAGE statement creates a named connection to external object storage such as Amazon S3.

Syntax

CREATE STORAGE [IF NOT EXISTS] storage_name
TYPE = S3
WITH (option = 'value' [, ...]);
  • storage_name: Name for the new storage connection.

  • TYPE: Storage type. Redpanda SQL currently supports only S3.

  • IF NOT EXISTS: Optional. Prevents an error if a storage connection with the same name already exists.

Options

Option Type Required Description

region

STRING

Yes

Cloud region for the storage bucket (for example, us-west-2).

access_key_id

STRING

Yes

AWS access key ID.

secret_access_key

STRING

Yes

AWS secret access key.

Examples

CREATE STORAGE archive_storage
TYPE = S3
WITH (
  region = 'us-west-2',
  access_key_id = 'AKIAIOSFODNN7EXAMPLE',
  secret_access_key = 'wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY'
);