-
-
Save ryo0301/f9a44ffa37cb779a9649 to your computer and use it in GitHub Desktop.
S3、Kinesis/DynamoDB StreamsでのLambdaリトライ処理 ref: http://qiita.com/ryo0301/items/de5d965381d2273cf0a5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
こちらの記事の内容と現在のリトライ動作は異なっています。 | |
詳細は下記の公式ドキュメントを参照してください。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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