Volume Configurations

This section includes steps for creating a GDS volume configuration to access your bucket with the AWS credentials you provide. Before starting, the following restrictions and limitations apply when creating a volume configuration:

  • Bucket to be used must be in the same region as ICA

  • Bucket must not have other notifications configured with a key prefix overlapping the key prefix provided with the volume configuration

  • Bucket may have SSE enabled with an Amazon S3 managed key (SSE-S3). KMS managed (SSE-KMS) or customer managed keys are not currently supported.

Volume Configuration Overview

A volume configuration provides GDS with information about your S3 bucket and references the credentials to the S3 bucket. The volume configuration validates that the information provided is correct, and then continuously monitors the integration. One or more volumes can be created given a specific volume configuration to make sure the data is stored and accessed from the bucket of your choice.

To limit access to a specific prefix of the bucket, a key-prefix can be set in the volume configuration. The key-prefix ensures that volumes associated with the volume configuration never reside outside of this key prefix.

Log in to ICA

To log in to ICA, enter the following command using the ICA CLI. You do not need domain administrator permissions.

ica login <your_email>

Use the following command if you are logging in with a domain.

ica login <your_email> -d <your_domain>

Create a Volume Configuration

Select a name for the volume configuration. When creating volumes that reside in the bucket, the volume configuration is referenced by the selected name.

You can optionally provide a --key-prefix to limit where files reside in the bucket. Files outside of the prefix are not accessible. If provided, the value must end with a trailing slash '/'. If not provided, the entire bucket is accessible.

BUCKET_NAME=<your_bucket_name>
VOLUME_CONFIG_NAME=<your_volume_config_name>
ica volumeconfigurations create ${VOLUME_CONFIG_NAME} --bucket-name ${BUCKET_NAME} --secret-name <secret-name>

GDS performs a series of steps in the background to verify the connection to your bucket. Provisioning the location in your S3 bucket as a GDS volume can take several minutes.

The 'onlineStatus' field for a named volume configuration shows as 'initializing' while the verification and provisioning steps are performed.

*If provisioning is successful, then the onlineStatus changes to Ok. *If onlineStatus changes to Error or does not change to Ok, then check the errorCode and errorMessage.

The following is an example of the command. Make sure onlineStatus=OK is included in the response before creating a volume.

ica volumeconfigurations get ${VOLUME_CONFIG_NAME}

...
onlineStatus                                Ok
...

Create a Volume

After the volume configuration is created and online, you can create a volume associated with the volume configuration.

You must choose a volume name. By default, the name is used as a prefix for where files for the volume are stored in the bucket. When creating a volume, you can choose to override the actual bucket key prefix used for the volume by specifying a --root-key-prefix <yourprefix>. Overriding the key prefix allows you to customize where in the bucket the files for the volume reside.

If you create a volume configuration with a --key-prefix in the previous step, the --root-key-prefix of the volume must begin with the --key-prefix of the volume configuration.

You can also create a volume that represents the entire bucket by creating a volume with --root-key-prefix of '/' and an empty volume configuration --key-prefix. Note that once created, you will not be able to create another volume configuration and/or volume for this bucket.

If there are objects already in the S3 bucket corresponding to the --root-key-prefix of the volume, GDS automatically indexes the objects shortly after creating the volume to make them accessible via GDS.

VOLUME_NAME=<your_volume_name>
ica volumes create $VOLUME_NAME --volume-configuration-name ${VOLUME_CONFIG_NAME}
id: vol.fc032e04a38e48fc1f2808d87788b999

Upload a File With the ICA CLI

To upload a file to the bucket, enter the following command. Replace the sample_file.txt with the name of your file.

touch sample_file.txt
ica files upload sample_file.txt gds://${VOLUME_NAME}/sample_file.txt

Verify file

For additional verification, use the following command to list files on the new volume.

ica files list gds://${VOLUME_NAME}/*
ID                                      URL                                     SIZE (BYTES)    ARCHIVESTATUS    TIMECREATED
fil.9506e7b11354476dc89808d877892e74    gds://${VOLUME_NAME}/sample_file.txt    0               None             2020-12-31 12:23:54.621 -0600 MDT

Last updated