Error getting lambda function during terraform upgrade

Hi Team, we are upgrading from terraform 0.11 to 1.0.0.While doing plan we are getting the below error. The lambda function is also present. But it is failing to get that. Role arns are all unchanged .Can you please help me on it.

Error: error getting Lambda Function (sale-dev-lmb-agsrq): ResourceNotFoundException: Function not found: arn:aws:lambda:eu-central-1:324566554890:function:sale-dev-lmb-agsrq
  {
   RespMetadata: {
      StatusCode: 404,
     RequestID: "30e3390c-f52f-4bf5-9155-76039351b8a8"
    },
    Message_: "Function not found: arn:aws:lambda:eu-central-1:324566554890:function:sale-dev-lmb-agsrq",
    Type: "User"
  }
  
    with data.aws_lambda_function.AgentSendRequest,
    on templates.tf line 1, in data "aws_lambda_function" "AgentSendRequest":
     1: data "aws_lambda_function" "AgentSendRequest" {

Hi @hemub441,

This error seems to be one reported by the remote AWS API rather than by Terraform itself, and so the appearance of this error to be more likely to be caused by upgrading the AWS provider than by upgrading Terraform CLI itself.

Did you also upgrade the AWS provider during your migration? Did you use the pre-upgrade checklist for your upgrade to Terraform v0.12, and follow its advice to upgrade the provider and see the new version working with Terraform v0.11 first, before upgrading to Terraform v0.12?