aws / aws/aws-lambda-roadmap

[Lambda] Add "Force Cold Start" action to Lambda console

Ouverte
#83 2 commentaires 9 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Aucune donnée de langage
Étoiles
196
Forks
5
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

### Community Note

* Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request
* Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
* If you are interested in working on this issue or have submitted a pull request, please leave a comment

**Tell us about your request**
Add a "Force Cold Start" action to the AWS Lambda console that would mark a function as "modified" to trigger a cold start on the next invocation. This action would be accessible through the top-right menu in the Lambda function console, similar to other function actions like "Publish new version" or "Create Alias".

**Which service(s) is this request for?**
AWS Lambda console interface / AWS Lambda API

**Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?**
During development and testing, Lambda functions often cache data in global variables or maintain connections that persist across warm invocations. Sometimes it's necessary to clear this cache or reset the function's state to test cold start behavior or troubleshoot issues related to cached data.

Currently, there's no direct way to force a Lambda function to perform a cold start without:
1. Updating the function code
2. Modifying environment variables
3. Changing function configuration
4. Waiting for the execution environment to naturally expire

This makes it difficult to:
- Test cold start performance and behavior
- Clear cached data that might be causing issues
- Validate that the function works correctly from a fresh state
- Debug problems that only occur during cold starts

The impact of not having this feature is increased development time and complexity when testing Lambda functions, especially those that rely heavily on caching or maintain state between invocations.

**Are you currently working around this issue?**
Yes, currently working around this by:
1. Adding/removing dummy environment variables to trigger a function update
2. Making minor code changes and redeploying
3. Updating function description or other metadata
4. Waiting for execution environments to naturally expire (unreliable timing)

These workarounds are cumbersome, time-consuming, and not ideal for rapid development/testing cycles.

**Additional context**
This feature would be particularly valuable for:
- Developers testing Lambda performance optimization
- Teams debugging caching-related issues
- DevOps engineers validating cold start behavior
- Anyone developing Lambda functions that maintain state between invocations

The implementation could be as simple as internally marking the function as "modified" when this action is triggered, which would cause AWS Lambda to create a new execution environment for the next invocation.

**Note on pricing justification:** Previously, cold start compute time was free, so AWS had logical reasons to prevent users from artificially triggering cold starts (to avoid potential abuse of free compute resources). However, since AWS now charges for all cold start duration, there's no longer a pricing incentive to restrict this capability. Users would be paying for any cold start they trigger, making an API call or console action to force cold starts reasonable for legitimate testing and performance evaluation purposes.

**Attachments**
Suggested button:
Image

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par examiner l’interface de la console AWS Lambda et l’AWS Lambda API, en vous concentrant sur le menu d’actions de la fonction situé en haut à droite, à côté de « Publish new version » et de « Create Alias ». Le travail est considéré comme terminé lorsqu’une action prise en charge « Force Cold Start » est définie et implémentée, afin que l’invocation suivante utilise un nouvel environnement d’exécution, avec son comportement et ses limitations documentés.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
aws
Domaine
api, cloud
Type d'issue
Fonctionnalité
Difficulté
5/5
Temps estimé
Plus d'une semaine
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
30/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.