aws dynamodb'batchWriteItem'返回'找不到请求的资源'

时间:2020-06-25 12:22:54

标签: node.js amazon-dynamodb

请让我解释一下:

  • 该表已存在(我检查状态为ACTIVE
  • 该批次中的大多数物品都写得很好,只有两个特定物品不是!总是一样的两个
  • 批处理操作成功完成(我可以在Web UI上看到这些项目)
  • 我已经检查,仔细检查过,仔细检查过三遍语法,以确保我在实际对象中没有错误(如果有任何区别,可以发布它们)
  • 即使我尝试不同的方法,错误也总是相同的,并且似乎总是暗示着其他问题?!如果我一次放一件物品,也会发生这种情况!

到底是什么会返回此错误?

Batch Write Error ResourceNotFoundException: Requested resource not found
  message: 'Requested resource not found',
  code: 'ResourceNotFoundException',
  time: 2020-06-25T12:10:30.480Z,
  requestId: '0B9B33BVJMILPHK1O78UVR2INNVV4KQNSO5AEMVJF66Q9ASUAAJG',
  statusCode: 400,
  retryable: false,
  retryDelay: 18.34986361501899

还有我写的样本:

这个很好用:

{
            "PutRequest": {
                "Item": {
                    "extractor": {
                        "M": {
                            "api": {
                                "S": "azure"
                            },
                            "model": {
                                "S": "some-uuid"
                            },
                            "uri": {
                                "S": "https://some-url.com/"
                            }
                        }
                    },
                    "form_alias": {
                        "S": "Polish Early"
                    },
                    "form_uid": {
                        "S": "PL.UPRP.submission_confirmation.print.pol"
                    },
                    "id": {
                        "N": "9"
                    },
                    "lookup": {
                        "L": [{
                            "M": {
                                "key": {
                                    "S": "date (filing)"
                                },
                                "type": {
                                    "S": "timestamp"
                                }
                            }
                        }, {
                            "M": {
                                "key": {
                                    "S": "european publication (encoded)"
                                },
                                "type": {
                                    "S": "string"
                                }
                            }
                        }]
                    },
                    "KEY": {
                        "N": "9"
                    }
                }
            }
        }

这失败了:

{
            "PutRequest": {
                "Item": {
                    "extractor": {
                        "M": {
                            "api": {
                                "S": "azure"
                            },
                            "model": {
                                "S": "some-uuid"
                            },
                            "uri": {
                                "S": "https://some-url.com"
                            }
                        }
                    },
                    "form_alias": {
                        "S": "Polish Early"
                    },
                    "form_uid": {
                        "S": "PL.BNP.payment_receipt.print.pol"
                    },
                    "id": {
                        "N": "11"
                    },
                    "lookup": {
                        "L": [{
                            "M": {
                                "key": {
                                    "S": "date (receipt)"
                                },
                                "type": {
                                    "S": "date"
                                }
                            }
                        }, {
                            "M": {
                                "key": {
                                    "S": "european publication"
                                },
                                "type": {
                                    "S": "string"
                                }
                            }
                        }]
                    },
                    "KEY": {
                        "N": "11"
                    }
                }
            }
        }

在19个项目中,只有两个失败,并且总是相同的两个。

0 个答案:

没有答案