我正在按照本教程将我的所有 DynamoDB 流自动索引到我创建的 Amazon ElasticSearch 服务集群中。
我一步一步地遵循它,并创建了所有权限策略。
但是,当我进行测试时,我的 Amazon ES 集群中没有任何索引。当我检查 CloudWatch 时,我会看到以下日志:
('ERROR: ', 'Traceback (most recent call last):
File "/var/task/lambda_function.py", line 123, in lambda_handler
return _lambda_handler(event, context)
File "/var/task/lambda_function.py", line 219, in _lambda_handler
post_to_es(es_payload) # post to ES with exponential backoff
File "/var/task/lambda_function.py", line 86, in post_to_es
es_ret_str = post_data_to_es(payload, es_region, creds, es_endpoint, \'/_bulk\')
File "/var/task/lambda_function.py", line 53, in post_data_to_es
req = botocore.awsrequest.create_request_object(params)
File "/var/runtime/botocore/awsrequest.py", line 314, in create_request_object
request_object.context.update(r[\'context\'])
KeyError: \'context\'
')
我不明白这个问题。我只知道我的 Lambda 函数成功触发了每个 DynamoDB 流并且可以将日志发送到 CloudWatch,但无法在 Amazon ES 中索引这些数据。
有人可以帮我解决这个问题吗?