ablog

不器用で落着きのない技術者のメモ

Lambda の同時実行数を1 にして並行実行してみる

  • AWS マネジメントコンソールで同時実行数を 1 に設定する。

f:id:yohei-a:20200629152942p:plain

  • 並行で実行する
for i in {1..100}
do
aws lambda invoke --function-name testLambdaFunction output_${i}.txt 2>&1 &
done;
  • TooManyRequestsException が発生し、4 回リトライして実行できない場合は諦めている。
{
    "ExecutedVersion": "$LATEST",
    "StatusCode": 200
}

An error occurred (TooManyRequestsException) when calling the Invoke operation (reached max retries: 4): Rate Exceeded.

An error occurred (TooManyRequestsException) when calling the Invoke operation (reached max retries: 4): Rate Exceeded.

An error occurred (TooManyRequestsException) when calling the Invoke operation (reached max retries: 4): Rate Exceeded.

An error occurred (TooManyRequestsException) when calling the Invoke operation (reached max retries: 4): Rate Exceeded.

An error occurred (TooManyRequestsException) when calling the Invoke operation (reached max retries: 4): Rate Exceeded.

An error occurred (TooManyRequestsException) when calling the Invoke operation (reached max retries: 4): Rate Exceeded.
{
    "ExecutedVersion": "$LATEST",
    "StatusCode": 200
}