ちょっと話題の記事

AWS LambdaにSLAが設けられました

2018.10.17

この記事は公開されてから1年以上経過しています。情報が古い可能性がありますので、ご注意ください。

はじめに

中山(順)です

AWS LambdaにSLAが設けられました。

Announcement: AWS Lambda announces service level agreement

AWS Lambda Service Level Agreement

稼働率が99.95%を下回るとサービスクレジットを受け取れます。

ちょっと内容を確認してみましょう。 今回は"Definitions"および"Lambda SLA Exclusions"に注目してみます。

Definitions

そもそも、どのように稼働率は算出されるのでしょうか。

それはDefinitionsに書いてあります。

  • Definitions
  • A “Service Credit” is a dollar credit, calculated as set forth below, that we may credit back to an eligible account.
  • “Monthly Uptime Percentage” for a given AWS region is calculated as the average of the Availability for all 5-minute intervals in a monthly billing cycle. Monthly Uptime Percentage measurements exclude downtime resulting directly or indirectly from any Lambda SLA Exclusion (defined below).
  • “Availability” is calculated for each 5-minute interval as the percentage of Requests (defined below) processed by Lambda that do not fail with Errors (defined below) and relate solely to the provisioned AWS Lambda functions. If you did not make any Requests in a given 5-minute interval, that interval is assumed to be 100% available.
  • “Request” is an invocation of a Lambda function by directly calling the invoke API or triggered by a supported event source.
  • An “Error” is any Request that returns a 500 or 503 error code.

エラーはサーバーエラーに限られますし、直接実行およびサポートされるイベントソースからの実行が稼働率を計算する際に対象となるリクエストであることなどが明記されています。

Lambda SLA Exclusions

SLAが適用されないケースについてはこちらに記載されています。

  • Lambda SLA Exclusions
  • The Service Commitment does not apply to any unavailability, suspension or termination of Lambda, or any other Lambda performance including but not limited to issues:
  • (i) caused by factors outside of our reasonable control, including any force majeure event or Internet access or related problems beyond the demarcation point of Lambda;
  • (ii) that result from any voluntary actions or inactions from you or any third party (e.g. scaling of provisioned capacity, misconfiguring security groups, VPC configurations or credential settings, disabling encryption keys or making the encryption keys inaccessible, etc.);
  • (iii) that result from you not following the best practices described in the Lambda User Guide on the AWS Site;
  • (iv) that result from your equipment, software or other technology and/or third party equipment, software or other technology (other than third party equipment within our direct control);
  • (v) that result from any maintenance as provided for pursuant to the Agreement; or
  • (vi) arising from our suspension and termination of your right to use Lambda in accordance with the Agreement (collectively, the “Lambda SLA Exclusions”).
  • If availability is impacted by factors other than those explicitly used in our Monthly Uptime Percentage calculation, then we may issue a Service Credit considering such factors at our discretion

注目すべきは、ベストプラクティスを遵守していない場合はSLAの対象外という点でしょうか。 まあ、当然といえば当然ですね^^;

ベストプラクティスはこちらですので、改めて確認しましょう。

AWS Lambda 関数を使用する際のベストプラクティス

まとめ

このようにSLAが設けられたとはいえ、適切に実装されていないとサービスクレジットを受け取れない可能性がありそうです。

「SLAキタコレ >> AWSが動作保証してくれる」なんてことはありませんので、エンジニアの皆様は自身の責務を正しく理解し、責務を果たしていきましょう。

現場からは以上です。