EMR Setup
Use this skill when datus emr is installed but has no configured environment.
Config structure
Profiles live under agent.plugins.emr.<profile> in the config file named by
the ## Plugins section of the system prompt:
agent:
plugins:
emr:
prod:
default: true
region: us-east-1
cluster_id: j-XXXXXXXXXXXXX # optional default cluster for `steps`
log_uri: s3://my-emr-logs/emr/ # optional; base for `steps logs`
# (usually the cluster's LogUri)
# credentials — omit to use the standard AWS chain, otherwise any of:
profile: my-aws-profile
role_arn: arn:aws:iam::123456789012:role/datus-emr
# access_key_id / secret_access_key — use ${VAR} refs
Steps
- Ask for
region, optionally a defaultcluster_id, and thelog_uriif the user wantssteps logs(this is the cluster's configured S3 log location). - The principal needs
elasticmapreduce:ListClusters,DescribeCluster,ListInstances,ListSteps,DescribeStep,AddJobFlowSteps,CancelSteps, pluss3:GetObjecton the log bucket forsteps logs. - Write the profile into the config file named in the
## Pluginspreamble; mark the first profiledefault: true. - Verify with
datus emr clusters list.
Troubleshooting
no cluster id— pass the cluster id or setcluster_idin the profile.no log_uri configured— setlog_urito read step logs from S3.steps logsempty/NoSuchKey — logs appear after the step runs; the path is<log_uri>/<cluster-id>/steps/<step-id>/stdout.gz.