You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何通过CloudFormation启用AWS EMR集群的调试功能?已配置LogUri但EMR Web UI仍提示调试未配置

How to Enable EMR Debugging via CloudFormation

Got it, let's fix that "Debugging not configured" issue you're seeing in the EMR Web UI. Even though you've set up LogUri, there's one key property you might be missing in your CloudFormation template to explicitly flip the debugging switch.

Step 1: Add the EnableDebugging Property to Your EMR Cluster Resource

In CloudFormation, enabling debugging requires two critical pieces:

  • A valid LogUri (which you already have, pointing to your S3 bucket path)
  • Explicitly setting EnableDebugging: true in your AWS::EMR::Cluster resource properties

Here's a simplified example of what your CloudFormation snippet should look like:

AWSTemplateFormatVersion: '2010-09-09'
Resources:
  MyDebugEnabledEMRCluster:
    Type: AWS::EMR::Cluster
    Properties:
      Name: EMR-Cluster-with-Debugging
      ReleaseLabel: emr-6.15.0 # Use a compatible EMR release for your workload
      LogUri: s3://your-log-bucket/emr-debug-logs/ # Your existing S3 log path
      EnableDebugging: true # This is the missing line that enables debugging
      Instances:
        InstanceGroups:
          - Name: Master Node
            InstanceRole: MASTER
            InstanceType: m5.xlarge
            InstanceCount: 1
          - Name: Core Nodes
            InstanceRole: CORE
            InstanceType: m5.xlarge
            InstanceCount: 2
      JobFlowRole: EMR_EC2_DefaultRole
      ServiceRole: EMR_DefaultRole

Step 2: Verify Role Permissions for Debug Logs

Even with the property set, debugging won't work if your EMR roles don't have the right access to your LogUri bucket. Double-check:

  • The EMR Service Role (typically EMR_DefaultRole) has permissions to read/write to your S3 log bucket. At minimum, it needs s3:PutObject, s3:GetObject, and s3:ListBucket actions for the bucket path.
  • The EMR EC2 Instance Role (typically EMR_EC2_DefaultRole) also needs these S3 permissions, since cluster nodes will write debug logs directly to the bucket.

Step 3: Validate the Debug Log Structure

Once the cluster is running with the correct config, EMR will automatically create a debug subdirectory under your LogUri path. This folder contains the detailed job logs and metadata that the EMR Web UI uses to recognize debugging is enabled. If you see this folder populated with logs, the "Debugging not configured" message should disappear.

Troubleshooting Quick Checks

  • If you deployed the cluster without EnableDebugging: true initially, you can't enable it on a running cluster via CloudFormation—you'll need to launch a new cluster with the updated template, or use the AWS CLI/UI to enable debugging on the existing cluster.
  • Make sure your LogUri ends with a trailing slash (/); EMR expects this format to organize logs correctly.

内容的提问来源于stack exchange,提问作者Guillaume

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.29 21:32:38