⚠️ This issue respects the following points: ⚠️
Bug description
If you set up NextCloud on an AWS instance, where you're using Instance Roles, instead of AccessKeys for authentication, then the variable $this->params['key'] will not be set. Resulting in the following errors in the logs:
[PHP] Warning: Undefined array key "key" at /var/www/html/apps/files_external/lib/Lib/Storage/AmazonS3.php#54
|
$this->id = 'amazon::external::' . md5($this->params['hostname'] . ':' . $this->params['bucket'] . ':' . $this->params['key']); |
Steps to reproduce
- Set up NextCloud on AWS (EC2 or ECS) with a Role that gives it permissions to access an S3 bucket
- Set up access to that S3 bucket using the 'External Storage' feature. Do no use authentication (since that is managed automatically using the Instance's Role)
- Observe the flood of errors in the Logs
Expected behavior
This setup should be expected and should not generate any Warnings
Nextcloud Server version
30
Operating system
Other
PHP engine version
PHP 8.3
Web server
Apache (supported)
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
Fresh Nextcloud Server install
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
What user-backends are you using?
Configuration report
{
"system": {
"htaccess.RewriteBase": "\/",
"memcache.local": "\\OC\\Memcache\\APCu",
"apps_paths": [
{
"path": "\/var\/www\/html\/apps",
"url": "\/apps",
"writable": false
},
{
"path": "\/var\/www\/html\/custom_apps",
"url": "\/custom_apps",
"writable": true
}
],
"upgrade.disable-web": true,
"instanceid": "***REMOVED SENSITIVE VALUE***",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"***REMOVED SENSITIVE VALUE***"
],
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"dbtype": "mysql",
"version": "32.0.1.2",
"overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbtableprefix": "oc_",
"mysql.utf8mb4": true,
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"config_preset": 7,
"trusted_proxies": "***REMOVED SENSITIVE VALUE***",
"maintenance": false,
"maintenance_window_start": "3",
"default_phone_region": "DE",
"forbidden_filename_basenames": [
"con",
"prn",
"aux",
"nul",
"com0",
"com1",
"com2",
"com3",
"com4",
"com5",
"com6",
"com7",
"com8",
"com9",
"com\u00b9",
"com\u00b2",
"com\u00b3",
"lpt0",
"lpt1",
"lpt2",
"lpt3",
"lpt4",
"lpt5",
"lpt6",
"lpt7",
"lpt8",
"lpt9",
"lpt\u00b9",
"lpt\u00b2",
"lpt\u00b3"
],
"forbidden_filename_characters": [
"<",
">",
":",
"\"",
"|",
"?",
"*",
"\\",
"\/"
],
"forbidden_filename_extensions": [
" ",
".",
".filepart",
".part"
],
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_smtpmode": "smtp",
"mail_sendmailmode": "smtp",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"mail_smtpauth": true,
"mail_smtpport": "587",
"mail_smtpname": "***REMOVED SENSITIVE VALUE***",
"mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
"twofactor_enforced": "true",
"twofactor_enforced_groups": [],
"twofactor_enforced_excluded_groups": [],
"memcache.distributed": "\\OC\\Memcache\\Redis",
"memcache.locking": "\\OC\\Memcache\\Redis",
"redis": {
"host": "***REMOVED SENSITIVE VALUE***",
"password": "***REMOVED SENSITIVE VALUE***",
"port": 6379
}
}
}
List of activated Apps
Enabled:
- activity: 5.0.0-dev.0
- app_api: 32.0.0
- bruteforcesettings: 5.0.0-dev.0
- circles: 32.0.0
- cloud_federation_api: 1.16.0
- comments: 1.22.0
- contactsinteraction: 1.13.1
- dashboard: 7.12.0
- dav: 1.34.2
- federatedfilesharing: 1.22.0
- federation: 1.22.0
- files: 2.4.0
- files_downloadlimit: 5.0.0-dev.0
- files_external: 1.24.0
- files_pdfviewer: 5.0.0-dev.0
- files_reminders: 1.5.0
- files_sharing: 1.24.0
- files_trashbin: 1.22.0
- files_versions: 1.25.0
- firstrunwizard: 5.0.0-dev.0
- guests: 4.6.0
- logreader: 5.0.0-dev.0
- lookup_server_connector: 1.20.0
- nextcloud_announcements: 4.0.0-dev.0
- notifications: 5.0.0-dev.0
- oauth2: 1.20.0
- password_policy: 4.0.0-dev.0
- photos: 5.0.0-dev.1
- privacy: 4.0.0-dev.0
- profile: 1.1.0
- provisioning_api: 1.22.0
- recommendations: 5.0.0-dev.0
- related_resources: 3.0.0-dev.0
- serverinfo: 4.0.0-dev.0
- settings: 1.15.1
- sharebymail: 1.22.0
- support: 4.0.0-dev.0
- survey_client: 4.0.0-dev.0
- systemtags: 1.22.0
- text: 6.0.1
- theming: 2.7.0
- twofactor_backupcodes: 1.21.0
- twofactor_totp: 14.0.0
- updatenotification: 1.22.0
- user_status: 1.12.0
- viewer: 5.0.0-dev.0
- weather_status: 1.12.0
- webhook_listeners: 1.3.0
- workflowengine: 2.14.0
Disabled:
- admin_audit: 1.22.0
- encryption: 2.20.0
- richdocuments: 9.0.1 (installed 9.0.1)
- richdocumentscode: 25.4.504 (installed 25.4.504)
- suspicious_login: 10.0.0-dev.0
- twofactor_nextcloud_notification: 6.0.0-dev.0
- user_ldap: 1.23.0
Nextcloud Signing status
No errors have been found.
Nextcloud Logs
{"reqId":"FaSfGTR2AvOz4pfzcpNp","level":2,"time":"2025-11-07T08:39:27+00:00","remoteAddr":"78.70.202.102","user":"felix.denbratt","app":"PHP","method":"PROPFIND","url":"/remote.php/dav/files/felix.denbratt/","message":"Undefined array key \"key\" at /var/www/html/apps/files_external/lib/Lib/Storage/AmazonS3.php#54","userAgent":"Mozilla/5.0 (Macintosh) mirall/4.0.1 (Nextcloud, macos-24.6.0 ClientArchitecture: arm64 OsArchitecture: arm64)","version":"32.0.1.2","clientReqId":"621923df-9a09-4617-82da-3acf40953b16","data":{"app":"PHP"},"id":"690db05e55f03"}
Additional info
OS: Running the official NextCloud Docker image
Bug description
If you set up NextCloud on an AWS instance, where you're using Instance Roles, instead of AccessKeys for authentication, then the variable
$this->params['key']will not be set. Resulting in the following errors in the logs:[PHP] Warning: Undefined array key "key" at /var/www/html/apps/files_external/lib/Lib/Storage/AmazonS3.php#54server/apps/files_external/lib/Lib/Storage/AmazonS3.php
Line 54 in 6ba4ca3
Steps to reproduce
Expected behavior
This setup should be expected and should not generate any Warnings
Nextcloud Server version
30
Operating system
Other
PHP engine version
PHP 8.3
Web server
Apache (supported)
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
Fresh Nextcloud Server install
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
What user-backends are you using?
Configuration report
{ "system": { "htaccess.RewriteBase": "\/", "memcache.local": "\\OC\\Memcache\\APCu", "apps_paths": [ { "path": "\/var\/www\/html\/apps", "url": "\/apps", "writable": false }, { "path": "\/var\/www\/html\/custom_apps", "url": "\/custom_apps", "writable": true } ], "upgrade.disable-web": true, "instanceid": "***REMOVED SENSITIVE VALUE***", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "***REMOVED SENSITIVE VALUE***" ], "datadirectory": "***REMOVED SENSITIVE VALUE***", "dbtype": "mysql", "version": "32.0.1.2", "overwrite.cli.url": "***REMOVED SENSITIVE VALUE***", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbtableprefix": "oc_", "mysql.utf8mb4": true, "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "installed": true, "config_preset": 7, "trusted_proxies": "***REMOVED SENSITIVE VALUE***", "maintenance": false, "maintenance_window_start": "3", "default_phone_region": "DE", "forbidden_filename_basenames": [ "con", "prn", "aux", "nul", "com0", "com1", "com2", "com3", "com4", "com5", "com6", "com7", "com8", "com9", "com\u00b9", "com\u00b2", "com\u00b3", "lpt0", "lpt1", "lpt2", "lpt3", "lpt4", "lpt5", "lpt6", "lpt7", "lpt8", "lpt9", "lpt\u00b9", "lpt\u00b2", "lpt\u00b3" ], "forbidden_filename_characters": [ "<", ">", ":", "\"", "|", "?", "*", "\\", "\/" ], "forbidden_filename_extensions": [ " ", ".", ".filepart", ".part" ], "mail_from_address": "***REMOVED SENSITIVE VALUE***", "mail_smtpmode": "smtp", "mail_sendmailmode": "smtp", "mail_domain": "***REMOVED SENSITIVE VALUE***", "mail_smtphost": "***REMOVED SENSITIVE VALUE***", "mail_smtpauth": true, "mail_smtpport": "587", "mail_smtpname": "***REMOVED SENSITIVE VALUE***", "mail_smtppassword": "***REMOVED SENSITIVE VALUE***", "twofactor_enforced": "true", "twofactor_enforced_groups": [], "twofactor_enforced_excluded_groups": [], "memcache.distributed": "\\OC\\Memcache\\Redis", "memcache.locking": "\\OC\\Memcache\\Redis", "redis": { "host": "***REMOVED SENSITIVE VALUE***", "password": "***REMOVED SENSITIVE VALUE***", "port": 6379 } } }List of activated Apps
Nextcloud Signing status
Nextcloud Logs
{"reqId":"FaSfGTR2AvOz4pfzcpNp","level":2,"time":"2025-11-07T08:39:27+00:00","remoteAddr":"78.70.202.102","user":"felix.denbratt","app":"PHP","method":"PROPFIND","url":"/remote.php/dav/files/felix.denbratt/","message":"Undefined array key \"key\" at /var/www/html/apps/files_external/lib/Lib/Storage/AmazonS3.php#54","userAgent":"Mozilla/5.0 (Macintosh) mirall/4.0.1 (Nextcloud, macos-24.6.0 ClientArchitecture: arm64 OsArchitecture: arm64)","version":"32.0.1.2","clientReqId":"621923df-9a09-4617-82da-3acf40953b16","data":{"app":"PHP"},"id":"690db05e55f03"}Additional info
OS: Running the official NextCloud Docker image