简体   繁体   English

AWS CloudWatch Logs未创建

[英]AWS CloudWatch Logs are not Created

I am trying to use AWS Glue to run an ETL job that fetches data from Redshift to S3. 我正在尝试使用AWS Glue来运行ETL作业,该作业将数据从Redshift提取到S3。

  1. When I run a crawler it successfully connects to Redshift and fetches schema information. 当我运行爬虫时,它成功连接到Redshift并获取架构信息。 Relevant logs are created under a log group aws-glue/crawlers. 在日志组aws-glue / crawlers下创建相关日志。

  2. When I run the ETL job, it is supposed to create a log stream under log groups aws-glue/jobs/output and aws-glue/jobs/error, but it fails to create such log streams, and eventually the job too fails. 当我运行ETL作业时,它应该在日志组aws-glue / jobs / output和aws-glue / jobs / error下创建一个日志流,但它无法创建这样的日志流,最终作业也失败了。

( I am using AWS managed AWSGlueServiceRole policy for Glue service) (我使用AWS托管的AWSGlueServiceRole政策进行Glue服务)

Since it does not produce any logs, it is difficult to identify the reason for ETL job failure. 由于它不生成任何日志,因此很难确定ETL作业失败的原因。 I would appreciate it if you could help me resolve this issue. 如果你能帮我解决这个问题,我将不胜感激。

Most of the time this has to do with your AWS service not having the correct permissions (yes, even for just writing logs!). 大多数情况下,这与您的AWS服务没有正确的权限有关(是的,即使只是写日志!)。

Adding something like this to the Glue role might do the trick: 将这样的东西添加到Glue角色可能会起到作用:

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "logs:CreateLogGroup", "logs:CreateLogStream", "logs:PutLogEvents" ], "Resource": "arn:aws:logs: : :*" } ] } {“Version”:“2012-10-17”,“Statement”:[{“Effect”:“Allow”,“Action”:[“logs:CreateLogGroup”,“logs:CreateLogStream”,“logs:PutLogEvents”] ,“资源”:“arn:aws:logs :: :: *”}]}

I would make sure that your Endpoint and VPC is set up correctly via these instructions: 我会确保通过以下说明正确设置您的Endpoint和VPC:

http://docs.aws.amazon.com/glue/latest/dg/setup-vpc-for-glue-access.html http://docs.aws.amazon.com/glue/latest/dg/setup-vpc-for-glue-access.html

I had my inbound rules set up correctly but did not set up the outbound rules which is what I think the issue was. 我正确设置了入站规则,但没有设置出站规则,这就是我认为问题所在。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM