当我将数据从 Amazon Simple Storage Service (Amazon S3) 导入 Amazon DynamoDB 时,导入失败并收到 unexpected token 错误消息。
解决方法
如果您在 DynamoDB 中使用 Import from S3(从 S3 导入)功能,则可能会收到类似于以下内容的错误消息:
"Unexpected token.Remainder of the file will not be processed."
查看 Amazon S3 对象的数据格式、压缩类型和路径。您的 Amazon S3 存储桶中的数据必须采用 CSV、DynamoDB JSON 或 ION 格式。如果您压缩数据,则只能使用 GZIP 或 ZSTD。
查看数据后,使用 DynamoDB 控制台请求导入。要跟踪您的导入状态,请在 DynamoDB 控制台中查看 Imports from S3(从 S3 导入)。