World Without Weapons?

Is world without weapons possible? What would happen in that kind of world? Can we live without constant wars or are we predetermined for constant conflicts?

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




How to save cost on AWS Lambda

In this Blog, we will discuss several ways to optimize or reduce our AWS Lambda costing. Let’s understand how Lambda billing works.

When it comes to pricing, Lambda costs you based on how much memory you allocate to the function and how long it runs in milliseconds. It also charges a flat rate of 20 cents per million invocations.

There are a few other charges also, such as data transfer fees, may be incurred when certain functionalities are enabled. As an example, when you allocate more space to /tmp storage or use provisioned concurrency. But for main on-demand functions, your main costs are:

The cost per millisecond of execution time is scaled proportionally to the amount of memory you allocate. As an example, one second of execution for a 10240MB function would be ~79 times the cost for one second of execution of a 128MB function.

So the first step is to determine how much memory should be assigned to your function. CPU allocation in lambda is determined by the amount of memory assigned to the function; the more memory assigned, the more CPU allotted. As a result, we must reduce costs without losing performance.

The state machine name will be prefixed with powerTuningStateMachine. Find it and click "Start execution". Here you can provide the execution input and an execution id:

As soon as you click “Start Execution” again, you’ll be able to visualize the execution.

Once the execution has been completed, you will find the execution results in the “Output” tab of the “Execution Details” section. The output will contain the optimal power configuration and its corresponding average cost per execution.

The state machine will return the following output:

From the visualization, you can see the actual graphical representation. I have two of these examples.

This is a very powerful tool that, when utilized correctly, may result in huge savings.

This, however, should not be done as a default because there is a cost connected with it. You still have to work for it, including:

Another way to save costs is to use provisioned concurrency. With provisioned concurrency, the cost per millisecond of execution time is about ~60% cheaper.

This technique will work only for high throughput functions, if you are able to keep these provisioned lambda’s busy for 70% of the time, then upfront will be cost-saving.

I don’t recommend this highly for everything, this is only for a certain scenario but yes this can also save some cost.

So, in terms of lowering Lambda costs, I don’t advocate it unless you truly know what you’re doing! Instead, utilize provided concurrency to eliminate Lambda cold starts, as it was designed to do.

Switching to the ARM Architecture is another approach to reduce Lambda execution costs. When compared to x86-based functions, it is around 18 to 24% cheaper per millisecond of execution time.

Things are highly subjective as for each user the workload may be different, as well as the priorities so you need to test and figure out which way suits you best. Moving out of lambda to another service like Fargate can also help in saving some costs. But again it’s highly subjective according to one’s use case.

Add a comment

Related posts:

What is The Pricing for Data Labeling and Annotations?

Data labeling process for image annotation is not only critical but time taking. It creates training data sets for machine learning and AI model development. And the cost of such training data also…

Time travel is not possible!

Let us define what time travel is. Time travel is when something moves faster or slower in time relative to others. As we all know, to do this we need a time machine. People are saying that time…

Even unpopular opinions deserve to be heard. Prometeus labs presents censorship antidote

Social media platforms are leveraging COVID-19 to vastly entrench their power in an ostensibly free society. Facebook announced the ban on anti-lockdown content. Twitter is heightening its role in…