Set variable with Project Web Interface

Alternatively, you can use the Project Web Interface to add the variable to the appropriate environment.

To add the remote storage variable using the Project Web Interface:

  1. In the Project Web Interface, select the environment from the left.

  2. Click the Configure environment icon.

  3. In the Configure Environment view, click the Variables tab.

  4. Click Add Variable.

  5. In the Name field, enter REMOTE_STORAGE

  6. In the Value field, add the JSON configuration.

  7. Select JSON value and Sensitive; deselect Inheritable by child environments.

  8. Click Add Variable.

Use optional authentication

The key and secret are optional. When you create the variable, you can hide the key and secret by selecting the sensitive option. With this setting, the values are not visible in the web interface. See Variable visibility in the Commerce on Cloud Infrastructure guide.

If you want to use an a different authentication method, omit the key and secret from the JSON configuration,. Configure the alternative authentication method, and verify that the server is authorized to the S3 bucket.

Sync the remote storage

After enabling the Remote Storage module, synchronize the current media files to the remote store location.

To start the synchronization:

  1. Use SSH to log in to the remote environment with remote storage configured.

  2. Start the sync.

bin/magento remote-storage:sync

Fastly configuration

If you choose to use the remote storage solution with an Adobe Commerce on cloud infrastructure project, use the Amazon S3 guidance in the Fastly documentation to ensure that Fastly Image Optimization works with AWS S3.

Be prepared with your Fastly credentials. On Pro projects, use SSH to connect to your server and get the Fastly credentials from the /mnt/shared/fastly_tokens.txt file. Staging and Production environments have unique credentials. You must get the credentials for each environment.

Continue setting up remote storage for cloud projects with the following tasks:

  1. Configure a Fastly backend integration.

  2. Create VCL logic for AWS S3 authentication.

  3. Create VCL logic for backend requests to the AWS S3 bucket.

Previous pageImage resizing
Next pageSession storage location

Commerce