Search code examples
amazon-web-servicesamazon-cloudfront

Cloudfront throwing an error TLSv1.2_2019 must satisfy enum value set: [TLSv1.1_2016, SSLv3, TLSv1.2_2018, TLSv1_2016, TLSv1]


Recently we updated the security policy in our AWS cloudfront to TLSv1.2_2019. Since then one of the lambdas has been throwing this error.

TLSv1.2_2019 must satisfy enum value set: [TLSv1.1_2016, SSLv3, TLSv1.2_2018, TLSv1_2016, TLSv1] 

The issue on github tackles exactly with this error. But the solution to upgrade the AWS CLI has not worked yet so far. A related link on stackoverflow answers with the same solution to upgrade the AWS CLI.

In the AWS Codebuild where the AWS CLI and AWS SAM CLI are installed and all the lambdas are build, this is the version number for AWS CLI and this version supports even the latest TLSv1.2_2021

aws-cli/2.11.16 Python/3.11.3 Linux/4.14.309-231.529.amzn2.x86_64 exec-env/AWS_ECS_EC2 exe/x86_64.ubuntu.20 prompt/off

SAM CLI, version 1.78.0

Is there anything else I am missing here ?


Solution

  • I think I have found the solution to this. I needed to upgrade my aws-sdk in package.json. It was at

    "aws-sdk": "2.257.1"
    

    and then I updated to

    "aws-sdk": "^2.1100.0"
    

    which installed this version, according to package.json in aws-sdk installed

     "version": "2.1435.0"