I was updating a S3 bucket policy today to allow a lambda function in a separate account to PutObjects into that bucket. Somehow while I was updating that policy I broke my external stage in Snowflake.
I can run the list@stage/subfolder
command and see a list of all filenames in the stage.
However if I attempt to
SELECT metadata$filename FROM @stage/subfolder
I receive the Failed to access remote file: access denied. Please check your credentials
error.
I am connecting to snowflake via the third option (https://docs.snowflake.net/manuals/user-guide/data-load-s3-config.html). I have established an IAM user and provided the access key id/secret access key when establishing the external stage.
Everything was working until I made separate changes to the bucket policy.
Does the ability to list @stage
but not select from the stage ring a bell to anyone? If not, I'll be happy to provide more specifics of the policies I've created.