Guillaume
Guillaume

Reputation: 2879

AWS EMR cluster with cloudformation: how to enable debugging

When creating an EMR cluster via the UI, I can click 'enable debugging'.

Via the cli, I can add the parameter --enable-debugging.

How can I do it via cloudformation? I did give a LogUri, where I do see the logs, but the EMR web UI carries on telling me 'Debugging not configured' when running Spark jobs.

Upvotes: 3

Views: 808

Answers (2)

bebyx
bebyx

Reputation: 150

The accepted answer is almost correct.

I received an error while deploying: CloudFormation currently only supports long-running clusters, set ActionOnFailure to CANCEL_AND_WAIT or CONTINUE.

So, the following code worked for me (also, YAML version for those, who would like to copypaste that format):

Steps:
  - Name: SetupHadoopDebugging
    ActionOnFailure: CONTINUE
    HadoopJarStep:
      Jar: command-runner.jar
      Args:
        - 'state-pusher-script'

Upvotes: 0

Jim
Jim

Reputation: 121

It just is added as the first step in the steps...so the equivalent of the below in CloudFormation config.

"Steps": [{
  "Name": "Setup Hadoop Debugging",
  "ActionOnFailure": "TERMINATE_CLUSTER",
  "HadoopJarStep": {
    "Jar": "command-runner.jar",
    "Args": ["state-pusher-script"]
  }
}]

Upvotes: 3

Related Questions