AttributeError:“DynamoHandler”对象没有属性“export_table_to_point_in_time”

问题描述 投票:0回答:1

我有一个功能,可以使用 1.33.13 版本中 boto3 的 export_table_to_point_in_time 导出发电机数据

client = boto3.client("dynamodb")
    response = client.export_table_to_point_in_time(
    TableArn = self.table_arn,
    ExportTime = self.date_start,
    S3Bucket = self.bucket,
    S3Prefix = self.prefix,
    ExportFormat = self.export_format,
    **kwargs
)

但是,在对该函数进行单元测试时,出现 AttributeError 错误: 'DynamoHandler' object has no attribute 'export_table_to_point_in_time'

我已经尝试在 Dynamo 中创建一个表,我已经尝试模拟 Dynamo 表,但没有任何效果

amazon-web-services amazon-dynamodb boto3 aws-glue amazon-dynamodb-streams
1个回答
0
投票

您没有显示完整的代码,但我猜您正在使用 moto?如果是这样,则不支持该功能:

https://docs.getmoto.org/en/latest/docs/services/dynamodb.html

© www.soinside.com 2019 - 2024. All rights reserved.