AWS CLI EMR get Master node Instance ID and tag it

后端 未结 4 1580
生来不讨喜
生来不讨喜 2021-01-06 22:20

I want to automate the running of a cluster and can use tags to get attributes of an EC2 instance like its instance-id.

The documentation on https://docs.aws.amazon.

4条回答
  •  一生所求
    2021-01-06 22:47

    Below can be used to directly get instance Id

    aws emr list-instances --cluster-id ${aws_emr_cluster.cluster.id} --instance- 
    group-id ${aws_emr_cluster.cluster.master_instance_group.0.id}  --query 
    'Instances[*].Ec2InstanceId' --output text
    

提交回复
热议问题