Archive

Archive for April, 2024

Updating #AWS Lambda #Python version

If, like me, you have an old Lambda function running Python 3.8, you may have got this email from AWS today;


We are contacting you as we have identified that your AWS Account currently has one or more AWS Lambda functions using the Python 3.8 runtime.

We are ending support for Python 3.8 in Lambda on October 14, 2024. This follows Python 3.8 End-Of-Life (EOL) which is scheduled for October, 2024 [1].

As described in the Lambda runtime support policy [2], end of support for language runtimes in Lambda happens in several stages. Starting on October 14, 2024, Lambda will no longer apply security patches and other updates to the Python 3.8 runtime used by Lambda functions, and functions using Python 3.8 will no longer be eligible for technical support. Also, Python 3.8 will no longer be available in the AWS Console, although you can still create and update functions that use Python 3.8 via AWS CloudFormation, the AWS CLI, AWS SAM, or other tools. Starting February 28, 2025, you will no longer be able to create new Lambda functions using the Python 3.8 runtime. Starting March 31, 2025, you will no longer be able to update existing functions using the Python 3.8 runtime.

So, the first thing, is to find which lambda functions are affected, and this, I wrote a Windows Batch script as follows;

@echo off

set regions=us-east-1 us-east-2 us-west-1 us-west-2 ap-south-1 ap-northeast-1 ap-northeast-2 ap-southeast-1 ap-southeast-2 ca-central-1 eu-central-1 eu-west-1 eu-west-2 eu-west-3 sa-east-1

for %%r in (%regions%) do (
    echo Listing Lambda functions in %%r region:
    aws lambda list-functions --region %%r --output text --query "Functions[?Runtime=='python3.8'].FunctionArn"
    echo -----------------------------------------
)

Then, once I listed all the functions, it’s a matter of going to each one in the AWS Lambda console, scrolling down on the “Code” tab, to change the runtime;

To change the runtime
  1. Open the Functions page of the Lambda console.
  2. Choose the function to update and choose the Code tab.
  3. Scroll down to the Runtime settings section, which is under the code editor.
  4. Choose Edit.
    1. For Runtime, select the runtime identifier.
    2. For Handler, specify file name and handler for your function.
    3. For Architecture, choose the instruction set architecture to use for your function.
  5. Choose Save.

License plate lookup #API now in #Kazakhstan

If your business is in the Automotive trade, and operates in, or with partners in Kazahkstan, it can be useful to be able to determine details of a vehicle based on the license plate of that car, automatically. This API now does that; Which you can find at avtokolik.kz

Car registration plates in Kazakhstan use the /CheckKazakhstan endpoint and returns the
following information:
● Make / Model
● Age
● Engine Size
● Colour
● Region
● Representative image
Sample Registration Number:
860AMZ17
Sample Json:


{
"Description": "OPEL VECTRA",
"RegistrationYear": "1998",
"CarMake": {
"CurrentTextValue": "OPEL"
},
"CarModel": {
"CurrentTextValue": "VECTRA"
},
"MakeDescription": {
"CurrentTextValue": "OPEL"
},
"ModelDescription": {
"CurrentTextValue": "VECTRA"
},
"Colour": "БЕЛЫЙ",
126
"EngineSize": "1598",
"Region": "Jetisu Region",
"ImageUrl": "https://avtokolik.kz/image.aspx/@T1BFTCBWRUNUUkE="
}
  1. Make/Model: Instantly identify the brand and model of the vehicle. For instance, the sample plate “860AMZ17” reveals an Opel Vectra.
  2. Age: Gain insight into the vehicle’s registration year. In our example, the Opel Vectra was registered in 1998.
  3. Engine Size: Know the power under the hood with details about engine size. The Opel Vectra comes equipped with a 1598 cc engine.
  4. Colour: Discover the vehicle’s exterior color. In this case, the Opel Vectra is white (“БЕЛЫЙ”).
  5. Region: Understand the region where the vehicle is registered. The Opel Vectra in our example is registered in the Jetisu Region.
  6. Representative Image: Visualize the vehicle with a representative image. Simply follow the provided URL to see how the Opel Vectra looks.

Utilizing this endpoint not only satisfies curiosity about vehicles on the road but also offers practical insights for various purposes, from verifying vehicle details before purchasing to conducting research on vehicle demographics in different regions of Kazakhstan.

With this accessible tool, individuals and businesses can make informed decisions, whether it’s for personal use, insurance purposes, or market analysis. Embrace the power of technology to unlock a wealth of information hidden within Kazakhstan’s car registration plates.

Categories: Uncategorized Tags: , , , ,