Allow specifying AWS profile in module configuration instead of relying on AWS_PROFILE environment variable

Created on 25 February 2025, 13 days ago

Problem/Motivation

When using the INI provider, the default profile value is set to "default". While it is always possible to inject the "AWS_PROFILE" environment variable to specify the profile to use, this forces the user to deal with configurations that might be outside their expertise and requires managing environment variables on the Apache or PHP-FPM side.

Although there is always the option to inject the variable in the settings.php file, similar to:
putenv('AWS_PROFILE=pre-pt-news');
But this approach is not very elegant.

Proposed resolution

- Adapt the module's configuration form.
- Modify the "getAmazonS3Client" method to consider the profile value specified in the configuration form and ensure it is used when calling the "CredentialProvider::ini" method.

User interface changes

Add a new text field where the user can specify which profile to use. If no profile is specified, the "[default]" profile will continue to be used as it is currently.

✨ Feature request
Status

Active

Version

3.7

Component

Code

Created by

πŸ‡ͺπŸ‡ΈSpain thebrokenbrain Las Palmas de Gran Canaria

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024