AWS-查找事件源映射UUID

我需要使用Terraform导入事件源映射,并且documentation说:

  

terrain导入aws_lambda_event_source_mapping.event_source_mapping   12345kxodurf3443

我在哪里都找不到资源的UUID?

谢谢

kuohao3026 回答:AWS-查找事件源映射UUID

使用AWS CLI,您可以获得UUID参数:

$ aws lambda list-event-source-mappings
{
    "EventSourceMappings": [
        {
            "UUID": "587ad24b-03b9-4413-8202-bbd56b36e5b7","BatchSize": 1,"EventSourceArn": "arn:aws:kinesis:us-east-1:123456789012:stream/Logging","FunctionArn": "arn:aws:lambda:us-east-1:123456789012:function:LoggingStream","LastModified": 1572309480.0,"LastProcessingResult": "OK","State": "Enabled","StateTransitionReason": "User action"
        }
    ]
}

您还可以使用常规的AWS API:https://docs.aws.amazon.com/lambda/latest/dg/API_ListEventSourceMappings.html

参考:https://docs.aws.amazon.com/cli/latest/reference/lambda/list-event-source-mappings.html

本文链接:https://www.f2er.com/3165158.html

大家都在问