I have installed boto3, aws cli, and python-braket-sdk. I have run aws configure
, and config with my IAM user. My IAM user isn't root user, but it has AdministratorAccess
, AmazonBraketFullAccess
, AmazonBraketJobsExecutionPolicy
policies.
But if I tried to get some quantum device by this command:aws braket get-device --device-arn arn:aws:braket:::device/qpu/ionq/ionQdevice
, it always return this error:
An error occurred (AccessDeniedException) when calling the GetDevice operation: User: arn:aws:iam::178363055402:user/hblab-rnd is not authorized to perform: braket:GetDevice on resource: arn:aws:braket::178363055402:device/qpu/ionq/ionQdevice with an explicit deny
If I run same below python from this link: https://github.com/aws/amazon-braket-sdk-python#usage, it also return similar error:
import boto3
from braket.aws import AwsDevice
from braket.circuits import Circuit
device = AwsDevice("arn:aws:braket:::device/quantum-simulator/amazon/sv1")
bell = Circuit().h(0).cnot(0, 1)
task = device.run(bell, shots=100)
print(task.result().measurement_counts)
Error output:
AccessDeniedException: An error occurred (AccessDeniedException) when calling the GetDevice
operation: User: arn:aws:iam::178363055402:user/hblab-rnd is not authorized to perform:
braket:GetDevice on resource: arn:aws:braket::178363055402:device/quantum-simulator/amazon/sv1
with an explicit deny
I have already added permissions for Braket, but I can not figure the reason for this bug. Please help
System information
I have found the answer. I have activated MFA authorization on my account, but in my aws cli
, I don't setup it. So I need to setup my aws cli
by a new account without MFA, or set up MFA for my aws cli
. Thank you everyone for help