Skip to content

Assetlibrary History Lambda Cost Increase #191

@aaronatbissell

Description

@aaronatbissell

Aws Connected Device Framework Affected Module(s):

assetlibrary-history

I'm submitting a ...

  • bug report
  • feature request

Description:

It appears that the recent update to assetlibrary history that increased the lambda function size from 128MB to 512MB has increased our lambda cost by about $80/day.

We are using about 12,400,000S per day. At a cost of 0.0000166667 per GB-S, the costs are as-follows based on your lambda size:

  • 128MB
    • 12400000 * 128/1024 * 0.0000166667 = ~$25 per day
  • 512MB
    • 12400000 * 512/1024 * 0.0000166667= ~$103 per day

It appears as though the increase in lambda memory size hasn't decreased the runtime of the lambda significantly enough to decrease the cost back to normal levels. I think this is probably because the history lambda is processing single records and 90+% of the lambda runtime is just loading Node, dependencies, etc. Very little time is spent actually processing the request.

Current behavior:

Lambda costs increased

Expected behavior:

Lambda costs shouldn't increase exponentially

Steps to reproduce:

Additional Information:
The lambda is using ~240MB of memory per invocation so bringing the memory back down to 128MB is not an option and 256MB seems too close to the limit for comfort. I believe this is very closely tied to #87 describes a similar problem with device monitoring and #88 would decrease the effect of this problem greatly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions