# Enable Lambda insight on existing lambda function

**URL:** <https://discuss.hashicorp.com/t/enable-lambda-insight-on-existing-lambda-function/25560>\
**Category:** Terraform\
**Created:** [June 16, 2021, 7:43pm UTC](https://discuss.hashicorp.com/t/enable-lambda-insight-on-existing-lambda-function/25560 "2021-06-16T19:43:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![saurabh13g](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/saurabh13g/32/20068_2.png) [@saurabh13g](https://discuss.hashicorp.com/u/saurabh13g)\
**Post date:** [June 16, 2021, 7:43pm UTC](https://discuss.hashicorp.com/t/enable-lambda-insight-on-existing-lambda-function/25560/1 "2021-06-16T19:43:12Z")

</div>

Hi,

I have a build a aws lambda function with a layer. its works fine ( using [https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lambda\_function](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lambda_function)

Description ) I want to enable “Lambda insights” [https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Lambda-Insights-Getting-Started.html](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Lambda-Insights-Getting-Started.html)

if we enable lambda insights manually from AWS console it adds a AWS provided layer in lambda function  
for ex:  
for my region is eu-west-1  
aws provided layer is : arn:aws:lambda:eu-west-1:580247275435:layer:LambdaInsightsExtension:14

Issue )  
It is clearly given in hashicorp how to enable/use a single layer while deploying a lambda function. However, I search hashicorp documentation ( & lot of google ) to find resource that describe how to achieve this via terraform i.e attaching AWS provided layer in existing lambda function ( which already has a layer attached )

If you guys can point me to right documentation or if any one has done with and can provide some tips then it will be highly appreciated.
