[AWS/Cloudformation]Lambda Function cheet sheet
[AWS/Cloudformation]Lambda Function cheet sheet:
https://docs.aws.amazon.com/ja_jp/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html
User Guide (API Version 2010-05-15)
https://docs.aws.amazon.com/ja_jp/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-deadletterconfig.html
https://docs.aws.amazon.com/ja_jp/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-tracingconfig.html
https://docs.aws.amazon.com/ja_jp/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-vpcconfig.html
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-code.html
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-environment.html
1. Lambda Function
https://docs.aws.amazon.com/ja_jp/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.htmlUser Guide (API Version 2010-05-15)
1.1. Property
| Reqired | Name | Type | Memo |
|---|---|---|---|
| ! | Code | Function Code | ソースコード |
| ! | Handler | String | 実行を開始するために呼び出す関数 |
| ! | Role | String | IAM 実行ロールの ARN |
| ! | Runtime | String | ランタイム環境 |
| - | DeadLetterConfig | Function DeadLetterConfig | 処理できないイベントに対処する方法 |
| - | Description | String | 関数の説明 |
| - | Environment | Function Environment | 環境設定 |
| - | FunctionName | String | 指定しないと物理 ID を生成 |
| - | KmsKeyArn | String | 環境変数用のAWS KMS キー の ARN |
| - | MemorySize | Integer | メモリ量 (MB) |
| - | ReservedConcurrentExecutions | Integer | 予約する最大同時実行数 |
| - | Timeout | Integer | 関数を終了してからの実行時間 (秒) |
| - | TracingConfig | Function TracingConfig | Lambda 関数の追跡設定 |
| - | VpcConfig | Function VpcConfig | (ENI) 設定に使用する VPC 設定 |
| - | Tags | List of tag | タグ |
1.1.1. Configuration
1.1.1.1. DeadLetterConfig
https://docs.aws.amazon.com/ja_jp/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-deadletterconfig.html| Reqired | Name | Type |
|---|---|---|
| - | TargetArn | String |
- TargetArn(実行ロール)
- 未処理のイベントを Lambda が送信するリソースの Amazon リソースネーム (ARN)
- Amazon SNS または Amazon SQS キューなど
- 関連するアクセス権限を明示的に提供する
- DLQ リソースへのアクセスを明示的に提供する
1.1.1.2. TracingConfig
https://docs.aws.amazon.com/ja_jp/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-tracingconfig.html| Reqired | Name | Type |
|---|---|---|
| - | Mode | String |
1.1.1.3. VpcConfig
https://docs.aws.amazon.com/ja_jp/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-vpcconfig.html| Reqired | Name | Type |
|---|---|---|
| ! | SecurityGroupIds | List of String |
| ! | SubnetIds | List of String |
1.1.2. Other
1.1.2.1. Code
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-code.html| Reqired | Name | Type |
|---|---|---|
| A | S3Bucket | String |
| A | S3Key | String |
| - | S3ObjectVersion | String |
| B | ZipFile | String |
- Reqired
- A もしくは B のどちらかが必須
- Placeholder として使うなら {"ZipFile": ""}
1.1.2.2. Environment
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-environment.html| Reqired | Name | Type |
|---|---|---|
| - | Variables | Mapping of key-value pairs |
1.2. Returns
| Name | Type | ... |
|---|---|---|
| Ref | logical ID | - |
| (Arn) | Amazon Resource Name | Fn::GetAtt |
コメント
コメントを投稿