Lambda のトリガー設定を確認する

Lambda の起動トリガーには様々なものが指定できます。

DynamoDB

list-event-source-mappings で確認できる。

$ aws lambda list-event-source-mappings --function-name "${FUNCTION_NAME}:latest"
{
    "EventSourceMappings": [
        {
            "UUID": "38d83d25-5850-4841-92f4-3de52cb69998",
            "StartingPosition": "LATEST",
            "BatchSize": 100,
            "MaximumBatchingWindowInSeconds": 0,
            "ParallelizationFactor": 1,
            "EventSourceArn": "arn:aws:dynamodb:ap-northeast-1:242651350578:table/camera_notification_event_dist/stream/2020-10-27T05:39:42.077",
            "FunctionArn": "arn:aws:lambda:ap-northeast-1:242651350578:function:ciaocamera-test-notificat-NotificationDistributeFu-vBlBnH3WrVvJ",
            "LastModified": "2022-10-06T15:13:00+09:00",
            "LastProcessingResult": "OK",
            "State": "Enabled",
            "StateTransitionReason": "User action",
            "DestinationConfig": {
                "OnFailure": {}
            },
            "MaximumRecordAgeInSeconds": -1,
            "BisectBatchOnFunctionError": false,
            "MaximumRetryAttempts": -1,
            "TumblingWindowInSeconds": 0,
            "FunctionResponseTypes": []
        }
    ]
}

S3

?

SNS

ただ Subscribe しているだけ

aws sns list-subscriptions | jq -r '.Subscriptions[] | select(.Endpoint == "arn:aws:lambda:ap-northeast-1:242651350578:function:ciaocamera-test-notificat-WebPushDistributeFuncF1E-E7Q6QefLYAeO") | .TopicArn'

SQS

list-event-source-mappings で確認できる。

$ aws lambda list-event-source-mappings --function-name "${FUNCTION_NAME}:latest"
{
    "EventSourceMappings": [
        {
            "UUID": "a99ece97-a941-4740-b64e-9abb4c498044",
            "BatchSize": 1,
            "MaximumBatchingWindowInSeconds": 0,
            "EventSourceArn": "arn:aws:sqs:ap-northeast-1:242651350578:ciaocamera-test-bts-sls-BatchArchiveJobQueue-z215EIEy3g3Z.fifo",
            "FunctionArn": "arn:aws:lambda:ap-northeast-1:242651350578:function:ciaocamera-test-bts-sls-BatchArchiveFunc-aS0aMfpTBcz4:latest",
            "LastModified": "2022-10-08T00:01:12.738000+09:00",
            "State": "Enabled",
            "StateTransitionReason": "USER_INITIATED",
            "FunctionResponseTypes": []
        },
    ]
}

Cron

結果なし

全 Lambda の EventSourceMappings を確認

aws lambda list-event-source-mappings

FUNCTION_NAME=ciaocamera-test-notificat-NotificationDistributeFu-vBlBnH3WrVvJ aws lambda list-function-event-invoke-configs --function-name "${FUNCTION_NAME}"