Skip to content

Instantly share code, notes, and snippets.

@ryo0301
Last active March 16, 2017 09:20
Show Gist options
  • Save ryo0301/f9a44ffa37cb779a9649 to your computer and use it in GitHub Desktop.
Save ryo0301/f9a44ffa37cb779a9649 to your computer and use it in GitHub Desktop.
S3、Kinesis/DynamoDB StreamsでのLambdaリトライ処理 ref: http://qiita.com/ryo0301/items/de5d965381d2273cf0a5
{
"message": "At least one of the pre-conditions you specified did not hold",
"code": "PreconditionFailed",
"time": "2014-12-03T02:54:39.101Z",
"statusCode": 412,
"retryable": false
}
こちらの記事の内容と現在のリトライ動作は異なっています。
詳細は下記の公式ドキュメントを参照してください。
s3.getObject({
Bucket: bucket,
Key: key,
IfMatch: event.Records[0].s3.object.eTag
}, function(err,data) {
if (err) {
console.log(JSON.stringify(err, null, 2));
context.done('error', err);
} else {
context.done();
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment