安装 Boto3 AWS EMR 尝试下载失败 bootstrap 操作

Install Boto3 AWS EMR Failed attempting to download bootstrap action

我正在尝试使用 bootstrap 操作选项(在所有节点上安装 boto3)创建我的集群,但总是 主实例尝试下载 bootstrap 操作 1 失败来自 S3 的文件

我的bootstrap文件: sudo pip install boto3

创建集群的命令:

aws emr create-cluster --applications Name=Hadoop Name=Hive Name=Hue Name=Mahout Name=Pig Name=Tez --ec2-attributes "{\"KeyName\":\"key-ec2\",\"InstanceProfile\":\"EMR_EC2_DefaultRole\",\"SubnetId\":\"subnet-49ad9733\",\"EmrManagedSlaveSecurityGroup\":\"sg-009d9df2b7b6b1302\",\"EmrManagedMasterSecurityGroup\":\"sg-0149cdd6586fe6db5\"}" --service-role EMR_DefaultRole --enable-debugging --release-label emr-5.30.1 --log-uri "s3n://aws-logs-447793603558-us-east-2/elasticmapreduce/" --name "MyCluster" --instance-groups "[{\"InstanceCount\":1,\"EbsConfiguration\":{\"EbsBlockDeviceConfigs\":[{\"VolumeSpecification\":{\"SizeInGB\":32,\"VolumeType\":\"gp2\"},\"VolumesPerInstance\":1}]},\"InstanceGroupType\":\"MASTER\",\"InstanceType\":\"m4.large\",\"Name\":\"Master Instance Group\"},{\"InstanceCount\":2,\"EbsConfiguration\":{\"EbsBlockDeviceConfigs\":[{\"VolumeSpecification\":{\"SizeInGB\":32,\"VolumeType\":\"gp2\"},\"VolumesPerInstance\":1}]},\"InstanceGroupType\":\"CORE\",\"InstanceType\":\"m4.large\",\"Name\":\"Core Instance Group\"}]" --scale-down-behavior TERMINATE_AT_TASK_COMPLETION --region us-east-2 --bootstrap-action Path=s3://calculsdistribues/bootstrap-emr.sh

我已经在没有 bootstrap-action 选项的情况下成功创建集群。

这里有什么错误?我的 bootstrap 文件应该是什么样子的? 谢谢

确保您已授予对 s3 存储桶的读取权限,您的 bootstrap 脚本存在于 Instace 配置文件 "InstanceProfile\":\"EMR_EC2_DefaultRole

查看日志后,我发现了这个错误: The bucket is in this region: eu-west-1. Please use this region to retry the request

问题是S3 bucket是在一个区域创建的,而集群是在另一个区域创建的。

我刚刚在同一个区域创建了集群,它运行良好。 谢谢