can i use safely a lambda as target when using CloudWatch PutDestination

0

Hello,

I have been playing around a bit with CloudWatch Destinations, my goal is to send logs across accounts. However, in the documentation and in the examples there is only the example with Kineses as destination for the CloudWatch Destinations.

Destination Object

https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_Destination.html here it talks mentioned Kinesis for example.

API Call

In the API description https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDestination.html, however, only Kinesis is mentioned. Also in the example only Kineses is mentioned. https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/Cross-Account-Log_Subscription-New.html

Lambda tweak

However, if a Lambda ARN is entered, this also works, the log events are successfully forwarded cross-account to the Lambda functions.

{
    "destinations": [
        {
            "destinationName": "my-name",
            "targetArn": "arn:aws:lambda:eu-central-1:xxxxxxxxxxxx:function:logs",
            "roleArn": "arn:aws:iam::xxxxxxxxxx:role/LambdaRole",
            "accessPolicy": "{......}",
            "arn": "arn:aws:logs:eu-central-1:xxxxxxxxxxxx:destination:logs",
        }
    ]
}

My question is therefore, can there be problems with this, since this is not described in the documentation, is there something to consider?

If it is usable without problems so, it would be nice if the Documentation can be adapted accordingly.

profile picture
질문됨 2년 전184회 조회
1개 답변
0

This is fully supported as can be seen in the doc here.

profile pictureAWS
전문가
Uri
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인