title: AWS CodePipline (CI/CD) to update the code of an existing AWS Lambda (not created with CloudFormation or SAM)
body: <p>I need to build a CI/CD pipeline that updates the code of an existing Lambda Function that was created using the console.
  Creating a new one is not an option!</p>
  
  <p>I was successful deploying the code using CloudFormation in the Deploy Stage but, it can only update the code for Lambda functions that are created with CloudFormation/SAM. When I specify the name of and existing Lambda in the template.yaml file it tries to create it and tells me that it already exists!</p>
  
  <p>The 2nd way i tried is deploying using CodeDeploy and i get this error:
  - "BundleType must be either YAML or JSON"</p>
  
  <p>This thread gives a workaround this problem and i could not apply it to my case:
  <a href="https://stackoverflow.com/questions/53136089/codepipeline-codedeploy-reports-bundletype-must-be-either-yaml-or-json">CodePipeline: CodeDeploy reports &quot;BundleType must be either YAML or JSON&quot;</a></p>
  
  <p>Is there any other way to make a proper CI/CD pipeline that only updates the code for a Lambda Function ?</p>