sam local invokeで timed out したときの対応

AWS SAMのローカル実行をしたときに、 Function 'YourFunctionName' timed out after 5 seconds が出ちゃったときの対応策。
といっても原因はエラーメッセージそのままなのでやることは単純。

Properties.Timeout の値を追記/変更する。 単位は秒。デフォルトは(おそらく)5。自分が試したときは5だった。

  Type: AWS::Serverless::Function
  Properties:
    Handler: index.js
    Runtime: nodejs8.10
    CodeUri: 's3://my-code-bucket/my-function.zip'
    Description: Creates thumbnails of uploaded images
    MemorySize: 1024
    Timeout: 15

参考: - https://stackoverflow.com/questions/56182205/aws-lambda-function-timedout-after-3-sec-using-aws-sam - https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction - https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-template.html#serverless-sam-template-function