如何在本地使用Boto3运行Step Functions

0

【以下的问题经过翻译处理】 我正在使用AWS Step Functions,并且我们正在研究测试选项。AWS Step Functions Local似乎是最佳选择。我已经按照这篇指南(https://aws.amazon.com/blogs/compute/mocking-service-integrations-with-aws-step-functions-local/)在本地进行了测试,效果不错。这涉及使用AWS CLI与SFN Local进行交互。由于我们使用Python,所以能够继续使用boto3与AWS进行交互将是很好的选择。请问是否有办法使用boto3查询本地的SFNs?我没有看到任何关于这方面的文档,并且我尝试过,但最新的boto3版本(1.24.71)如何连接到本地端点呢?

1 Antwort
0

【以下的回答经过翻译处理】 你可以按照以下方式指定 endpoint:

import boto3

client = boto3.client('stepfunctions', endpoint_url='http://localhost:8083')

参考文献:https://boto3.amazonaws.com/v1/documentation/api/latest/reference/core/session.html

profile picture
EXPERTE
beantwortet vor 5 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen