首页 文章

使用AWS RedshiftBasicEmitter时出现S3ServiceException

提问于
浏览
5

我正在使用GitHub中的示例AWS kinesis / redshift代码 . 我在EC2实例中运行代码并遇到以下异常 . 请注意,从Kinesis到S3的发射实际上是成功的 . 但从S3到Redshift的排放失败了 . 由于同一程序中的两个 Launcher 使用相同的凭证,我很困惑为什么只有其中一个失败!?

据我所知,大多数人都会收到“您提供的AWS访问密钥ID在我们的记录中不存在”例外可能会在正确设置S3密钥对时出现问题 . 但这似乎并非如此,因为向S3发射成功 . 如果凭据没有读访问权限,则应该抛出授权错误 .

如果您有任何见解,请评论 .

Mar 16, 2014 4:32:49 AM com.amazonaws.services.kinesis.connectors.s3.S3Emitter emit
INFO: Successfully emitted 31 records to S3 in s3://mybucket/495362565978733426345566872055061454326385819810529281-49536256597873342638068737503047822713441029589972287489
Mar 16, 2014 4:32:50 AM com.amazonaws.services.kinesis.connectors.redshift.RedshiftBasicEmitter executeStatement
SEVERE: org.postgresql.util.PSQLException: ERROR: S3ServiceException:The AWS Access Key Id you provided does not exist in our records.,Status 403,Error InvalidAccessKeyId,Rid 5TY6Y784TT67,ExtRid qKzklJflmmgnhtttthbce+8T0NIR/sdd4RgffTgfgfdfgdfgfffgghgdse56f,CanRetry 1
  Detail: 
  -----------------------------------------------
  error:  S3ServiceException:The AWS Access Key Id you provided does not exist in our records.,Status 403,Error InvalidAccessKeyId,Rid 5TY6Y784TT67,ExtRid qKzklJflmmgnhtttthbce+8T0NIR/sdd4RgffTgfgfdfgdfgfffgghgdse56f,CanRetry 1
  code:      8001
  context:   Listing bucket=mfpredshift prefix=49536256597873342637951299872055061454326385819810529281-49536256597873342638068737503047822713441029589972287489
  query:     3464108
  location:  s3_utility.cpp:536
  process:   padbmaster [pid=8116]
  -----------------------------------------------

Mar 16, 2014 4:32:50 AM com.amazonaws.services.kinesis.connectors.redshift.RedshiftBasicEmitter emit
SEVERE: java.io.IOException: org.postgresql.util.PSQLException: ERROR: S3ServiceException:The AWS Access Key Id you provided does not exist in our records.,Status 403,Error InvalidAccessKeyId,Rid 5TY6Y784TT67,ExtRid qKzklJflmmgnhtttthbce+8T0NIR/sdd4RgffTgfgfdfgdfgfffgghgdse56f,CanRetry 1
  Detail: 
  -----------------------------------------------
  error:  S3ServiceException:The AWS Access Key Id you provided does not exist in our records.,Status 403,Error InvalidAccessKeyId,Rid 5TY6Y784TT67,ExtRid qKzklJflmmgnhtttthbce+8T0NIR/sdd4RgffTgfgfdfgdfgfffgghgdse56f,CanRetry 1
  code:      8001
  context:   Listing bucket=mybucket prefix=495362565978733426345566872055061454326385819810529281-49536256597873342638068737503047822713441029589972287489
  query:     3464108
  location:  s3_utility.cpp:536
  process:   padbmaster [pid=8116]
  -----------------------------------------------

1 回答

  • 6

    我遇到了同样的错误 . 我正在使用IAM角色获取凭据 . 在我的情况下,它通过修改 RedshiftBasicEmitter 来解决,将 ;token=TOKEN 添加到 CREDENTIALS 参数(最后我创建了自己的 IEmitter ) .

    http://docs.aws.amazon.com/redshift/latest/dg/r_COPY.html

相关问题