小编sno*_*all的帖子

botocore.exceptions.DataNotFoundError:无法加载数据:sqs

我正在尝试运行一个清除 AWS SQS 队列的函数,但我不断收到此错误:

DataNotFoundError(data_path = name)botocore.exceptions.DataNotFoundError:无法加载数据:sqs

我已经安装了python 3.7boto3-1.21.22botocore-1.24.22。我也跑了pip install --upgrade botocore,但仍然遇到同样的错误。

看图片

sqs_client = boto3.client('sqs', AWS_DEFAULT_REGION, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY)

def purge_queue(queue_url): 
    try:
        response = sqs_client.purge_queue(QueueUrl=queue_url)
    except ClientError as e:
        logger.exception("Unexpected exception! %s", e)
        raise
    else:
        return response
Run Code Online (Sandbox Code Playgroud)

python botocore boto3

-1
推荐指数
1
解决办法
5447
查看次数

标签 统计

boto3 ×1

botocore ×1

python ×1