Based on "Configuring the s3 Protocol:"
source: https://techdocs.broadcom.com/us/en/vmware-tanzu/data-solutions/tanzu-greenplum/5/greenplum-database/admin_guide-external-g-s3-protocol.html
When non superuser is trying to use external table on S3:
create WRITABLE EXTERNAL TABLE public.test_write (like public.my_table) LOCATION('s3://myhost.com:9020/gpdev/dataset4/normal/tables config=/home/gpadmin/s3/s3.conf') FORMAT 'csv'; Error: ERROR [42501] ERROR: permission denied for external protocol S3;
If you try to grant him rights:
prod=# grant all on protocol S3 to "my_user"; ERROR: protocol "s3" is not trusted HINT: Only superusers may use untrusted protocols.
DROP PROTOCOL s3 CREATE TRUSTED PROTOCOL s3 (writefunc = write_to_s3, readfunc = read_from_s3);
dedwh=# DROP PROTOCOL s3 dedwh-# ; ERROR: cannot drop protocol s3 because other objects depend on it DETAIL: external table s3writ depends on protocol s3 external table s3write depends on protocol s3 (...)In order to recreate S3 you have to drop all external tables that depend on it
prod=# alter user "my_user" CREATEEXTTABLE (type='writable'); ALTER ROLE prod=# grant all on protocol S3 to "my_user"; GRANT prod=#