Skip to content

BraketProvider() working region #697

@albetriv

Description

@albetriv

Environment

  • Qiskit Optimization version: 0.7.0
  • Python version: 3.10
  • Operating system: Mac os 14.6

What is happening?

Hello, I'm tryng to connect to a aws braket backend that is not in my default region.
This query work fine
backends = provider.backends(statuses=["ONLINE"])
but this one is using the wrong region
provider.backends(statuses=["ONLINE"], types=["SIMULATOR"])

snippet.txt

How can we reproduce the issue?

The snippet shows the basic steps to reproduce the error.
I configured .aws/config with 2 profiles like these:

[default]
region = eu-south-1

[profile user-virginia]
region = us-east-1

What should happen?

after this export on terminal:
export AWS_PROFILE=user-virginia

both
BraketProvider().backends(statuses=["ONLINE"])
and
BraketProvider().backends(statuses=["ONLINE"], types=["SIMULATOR"])
should connect to us-east-1

but the second returns:
EndpointConnectionError: Could not connect to the endpoint URL: "https://braket.eu-south-1.amazonaws.com/devices"

Any suggestions?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions