Estou usando uma ferramenta CLI (do apache spark) que usa o boto abaixo. Embora eu já tenha confirmado que o
AWS_ACCESS_KEY
AWS_SECRET_KEY
estão corretos (via ec2-describe-regions
) a autorização ainda falha:
ec2/spark-ec2 -k mykey --copy -s 5 -i ~/.ssh/mykey.pem -t c3.2xlarge
-z us-east-1a -r us-east-1 launch mycluster
Observe o erro final após o rastreamento de pilha:
<Response><Errors><Error><Code>AuthFailure</Code><Message>AWS was not able to
validate the provided access credentials</Message></Error></Errors>
Aqui está a saída completa:
Setting up security groups...
ERROR:boto:401 Unauthorized
ERROR:boto:<?xml version="1.0" encoding="UTF-8"?>
<Response><Errors><Error><Code>AuthFailure</Code><Message>AWS was not able to validate the provided access credentials</Message></Error></Errors><RequestID>f960cab0-bfe6-4939-913c-5fbc0bf8662f</RequestID></Response>
Traceback (most recent call last):
File "ec2/spark_ec2.py", line 1509, in <module>
main()
File "ec2/spark_ec2.py", line 1501, in main
real_main()
File "ec2/spark_ec2.py", line 1330, in real_main
(master_nodes, slave_nodes) = launch_cluster(conn, opts, cluster_name)
File "ec2/spark_ec2.py", line 482, in launch_cluster
master_group = get_or_make_group(conn, cluster_name + "-master", opts.vpc_id)
File "ec2/spark_ec2.py", line 343, in get_or_make_group
groups = conn.get_all_security_groups()
File "/shared/sparkup2/ec2/lib/boto-2.34.0/boto/ec2/connection.py", line 2969, in get_all_security_groups
[('item', SecurityGroup)], verb='POST')
File "/shared/sparkup2/ec2/lib/boto-2.34.0/boto/connection.py", line 1182, in get_list
raise self.ResponseError(response.status, response.reason, body)
boto.exception.EC2ResponseError: EC2ResponseError: 401 Unauthorized
<?xml version="1.0" encoding="UTF-8"?>
<Response><Errors><Error><Code>AuthFailure</Code><Message>AWS was not able to
validate the provided access credentials</Message></Error></Errors>