How do I use a Spinup S3 bucket?

Objective
Establish a connection and configure your Spinup S3 bucket.

Introduction
Spinup offers a service around Amazon Simple Storage Service (S3) for university researchers. With Spinup, an S3 bucket in AWS is provided, accompanied by an access key granting full permissions. There are two primary methods for connecting: the AWS Command Line Interface (CLI) and the graphical user interface (GUI) via Cyberduck.


Setting Up Your Access Key

Remember to always handle access keys and secret keys with care, ensuring they remain confidential to prevent unauthorized access.

  1. Navigate to Spinup and either create a new S3 bucket or open an existing one.

  2. In the ‘Users’ Panel, click on the “+” icon to add a new bucket user.

  3. Edit the name of the user (if desired), then press the “Save” icon to the right to save the newly created user.

  4. Proceed to the “Access Keys” section and select “Create Key”. This will generate a public key (which is always retrievable from your Spinup bucket) and a one-time visible private key. Ensure you note down the private key immediately as it won't be displayed again. Both keys are essential for connecting to your S3 Bucket.

If you have lost access to your private key, select “Reset Key” from the Access Keys section, and a new key pair will be generated.


Connecting to S3 via Cyberduck (GUI)

Installation

Automatic Connection Using a Configuration File

  • Access Spinup and open the desired S3 bucket.

  • Click on the “Connect (Cyberduck)” button located at the top. This action will download a Cyberduck configuration file.

  • Once downloaded, double-click on the configuration file to open it with Cyberduck.

  • Follow the prompted steps and input your access key pair to establish a connection with the S3 bucket.

To bookmark your configuration in Cyberduck, simply drag and drop the config file into Cyberduck (while you are not connected to an instance).


Manual Connection

  • Initiate Cyberduck and select the gear icon. From the dropdown, opt for 'New Bookmark'.

  • From the provided options, choose "Amazon S3".

  • Click "More Options". Here, specify your S3 bucket's path in the "Path" field. Make sure to also input your Secret Access Key and Access Key ID obtained from Spinup.

  • In the "Path" section of Cyberduck, prefix your bucket name with a slash (/).

  • Save your settings by closing the dialog. You can now connect via your bookmark by double clicking the instance, and connecting via your access key pair.

Managing Files in S3 with Cyberduck (GUI)


Connecting to S3 via AWS CLI:

  • Installation:

  • Configuration:

    • From your terminal or command line, input:

      $ aws configure --profile <BUCKET-NAME>

      Replace <BUCKET-NAME> with your actual bucket name found in the "Storage details" panel, e.g., spinup000123-mybucket.

    • Input the requested details, which include key, secret, region, and desired output format.

  • Commands:
    Use the AWS CLI for various tasks like copying, listing, deleting, or syncing files. Always remember to specify your profile name using the --profile option.

    Examples for a bucket named spinup000123-mybucket:

    • Upload a file:

      $ aws s3 --profile spinup000123-mybucket cp test.png s3://spinup000123-mybucket

      This command uploads a file named test.png from your local directory to the specified S3 bucket.

    • List all files in the bucket:

      $ aws s3 --profile spinup000123-mybucket ls s3://spinup000123-mybucket

      Displays a list of all files and directories within the specified S3 bucket.

    • View size of all objects:

      Provides a detailed summary of all objects in the bucket, including their sizes in a human-readable format.

    • Delete a file:

      Removes the specified file (test.png in this case) from the S3 bucket. Exercise caution when deleting files, especially if backups are not in place.

    For a comprehensive list of command options and detailed explanations, input aws s3 help.