# Functionbeat fails to update with a new cloudwatch log group Could not execute the lambda function

**URL:** <https://discuss.elastic.co/t/functionbeat-fails-to-update-with-a-new-cloudwatch-log-group-could-not-execute-the-lambda-function/315020>\
**Category:** Beats\
**Tags:** functionbeat\
**Created:** [September 23, 2022, 1:47pm UTC](https://discuss.elastic.co/t/functionbeat-fails-to-update-with-a-new-cloudwatch-log-group-could-not-execute-the-lambda-function/315020 "2022-09-23T13:47:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kay\_Khan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kay_khan/32/45028_2.png) [@Kay\_Khan](https://discuss.elastic.co/u/Kay_Khan)\
**Post date:** [September 23, 2022, 1:47pm UTC](https://discuss.elastic.co/t/functionbeat-fails-to-update-with-a-new-cloudwatch-log-group-could-not-execute-the-lambda-function/315020/1 "2022-09-23T13:47:54Z")

</div>

We had functionbeat running and i had to remove and recreate it, however im getting the following errors:

```auto
{"log.level":"info","@timestamp":"2022-09-23T13:55:44.066+0100","log.logger":"aws","log.origin":{"file.name":"aws/op_cloudformation.go","file.line":97},"message":"Stack event received, ResourceType: AWS::Logs::SubscriptionFilter, LogicalResourceId: fnbcloudwatchSFawslambdanfttransposeprodmain, ResourceStatus: CREATE_FAILED, ResourceStatusReason: Resource handler returned message: \"Could not execute the lambda function. Make sure you have given CloudWatch Logs permission to execute your function. (Service: CloudWatchLogs, Status Code: 400, Request ID: 56335ff6-e8d8-4536-bbfa-44f72d15426f)\" (RequestToken: a0b9b8fc-e348-398b-dd38-dc91cabcb2ab, HandlerErrorCode: InternalFailure)","service.name":"functionbeat","ecs.version":"1.6.0"}

```

I dont know why it fails, it suggests to check permissions but i dont believe that is the issue as im able to add log groups sometimes and other times i get this error. Once i get this error, the functionbeat is in an unrecoverable state and i can no longer rollback/update. I have to remove and redeploy and start again.

functionbeat 8.2.2

---

<div class="post-metadata">

**Author:** ![manish\_agnani](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/manish_agnani/32/112057_2.png) [@manish\_agnani](https://discuss.elastic.co/u/manish_agnani)\
**Post date:** [October 14, 2022, 7:07am UTC](https://discuss.elastic.co/t/functionbeat-fails-to-update-with-a-new-cloudwatch-log-group-could-not-execute-the-lambda-function/315020/2 "2022-10-14T07:07:16Z")

</div>

same happening with me

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 11, 2022, 9:07am UTC](https://discuss.elastic.co/t/functionbeat-fails-to-update-with-a-new-cloudwatch-log-group-could-not-execute-the-lambda-function/315020/3 "2022-11-11T09:07:57Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
