Create Authorization
CREATE AUTHORIZATION MyAuthObj USER 'YOUR-ACCESS-KEY-ID' PASSWORD 'YOUR-SECRET-ACCESS-KEY';
Create Foreign Table
CREATE FOREIGN TABLE sensordata2,
EXTERNAL SECURITY MyAuthObj
USING (
LOCATION ('/s3/YOUR-BUCKET.s3.amazonaws.com/')
);