I need to set my aws lambda function runtime to a specific runtime , I managed to get the desired ARN from the logs , however it is not working ,
I tried below cli command :
aws lambda update-function-configuration --function-name function_name_xxxx --runtime arn:aws:lambda:us-east-1::runtime:b475b23763329123d9e6f79f51886d0e1054f727f5b90ec945fcb2a3ec09afdd
I got below error :
An error occurred (InvalidParameterValueException) when calling the UpdateFunctionConfiguration operation: Value arn:aws:lambda:us-east-1::runtime:b475b23763329123d9e6f79f51886d0e1054f727f5b90ec945fcb2a3ec09afdd at 'runtime' failed to satisfy constraint: Member must satisfy enum value set: [nodejs20.x, provided.al2023, python3.12, java17, nodejs16.x, dotnet8, python3.10, java11, python3.11, dotnet6, java21, nodejs18.x, provided.al2, ruby3.3, java8.al2, ruby3.2, python3.8, python3.9] or be a valid ARN
I tried adding aws account id to the ARN although it was not originally in the logged ARN and still same issue
aws lambda update-function-configuration --function-name function_name_xxxx --runtime arn:aws:lambda:us-east-1:account_id_xxxxxx:runtime:b475b23763329123d9e6f79f51886d0e1054f727f5b90ec945fcb2a3ec09afdd
same error resulted as below
An error occurred (InvalidParameterValueException) when calling the UpdateFunctionConfiguration operation: Value arn:aws:lambda:us-east-1:account_id_xxxxxx:runtime:b475b23763329123d9e6f79f51886d0e1054f727f5b90ec945fcb2a3ec09afdd at 'runtime' failed to satisfy constraint: Member must satisfy enum value set: [nodejs20.x, provided.al2023, python3.12, java17, nodejs16.x, dotnet8, python3.10, java11, python3.11, dotnet6, java21, nodejs18.x, provided.al2, ruby3.3, java8.al2, ruby3.2, python3.8, python3.9] or be a valid ARN
note that I also tried the ARN that is achieved by get-function-configuration
cli command under RuntimeVersionConfig.RuntimeVersionArn