4

I have created a external table in redshift spectrum.Upon running the select * from table_name, i am getting following error

SQL Error [XX000]: ERROR: Spectrum Scan Error
  Detail: 
  -----------------------------------------------
  error:  Spectrum Scan Error
  code:      15007
  context:   Forbidden: HTTP response error code: 403 Message: AccessDenied Access Denied

Please let me know what can be issue. I am able to do aws s3 ls and aws s3 cp command on same s3 location.

nat
  • 557
  • 2
  • 11
  • 25

2 Answers2

3

Spectrum scan error you get when there is discrepancy in source columns data type and destination column data types, for that you have to change data types according to Redshift's standard data type format.

For checking errors you can refer this query-

Select * from SVL_S3LOG where query = 'Query_id needs to be placed here'

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Apr 28 '22 at 13:00
0

In my case at least, the fix for this exact error was to allow the Redshift IAM role to decrypt using the KMS key on the S3 bucket.

Curly
  • 43
  • 7