Comments (9)
There is a serverless plugin for this now:
https://github.com/ajmath/serverless-offline-scheduler
from serverless-offline.
I don't know what are scheduled events yet. Is it like a cron call on your lambda?
from serverless-offline.
@dherault, yup, they're created via CloudFormation in serverless
. They're actually "Events" in CloudWatch, exactly like cron calls. As far as I can tell, they need to be enabled manually the first time they're deployed with serverless
.
@vanerleo, I think enabling events would be tricky for serverless-offline
and might be better suited for a separate plugin. It would involve keeping track of event trigger times and the current time/date, which seems something system-wide and beyond the scope of a stateless HTTP server.
However, a convenient way to load the entire serverless-offline
environment and manually run a function would be nice. Something like sls offline run functionName
?
from serverless-offline.
agreed ,sls offline run functionName
would be a good feature to set up all vars at least
@andreipopovici in regards to enabling them in CouldWatch, i've read that having a setting in "config"
{
"enabled": true
}
should enable it ... but so far no luck with getting it to auto enable on first deploy
see serverless/serverless#698
serverless/serverless#939
from serverless-offline.
@vanerleo I had no idea about the enabled
flag! Thanks for that 👍
With [email protected]
and higher, I think that the default sls function run functionName
actually loads all env variables specified in the _meta
folder for that particular stage, so that's a possible existing replacement.
@vanerleo, I would see the ability to run scheduled events as part of a fork of serverless-offline
, made with the purpose of replacing AWS Lambda itself with a self-hosted solution (to help escape vendor lock-in). Till then, I recommend closing this issue, if you and @dherault agree.
from serverless-offline.
@vangorra nice one, thanks
from serverless-offline.
Thanks @vanerleo its working after added plugin. 👍
from serverless-offline.
@vangorra, it works with nodejs functions only
from serverless-offline.
TY @vangorra, it's work for me. i tried for the other plugin serverless-offline-schedule
but the plugin have a bug when try to run.
from serverless-offline.
Related Issues (20)
- How to clear cache on cognito HOT 1
- x-api-key no longer being provided HOT 4
- Lambci docker images are deprecated and no more maintained. HOT 1
- contentHandling
- MaxListenersExceededWarning with esbuild
- Expired image for lambci/lambda:go1.x HOT 3
- Sponsors inquiry
- Node 20 support? HOT 3
- serverless offline with angular cli application
- NODE_PRESERVE_SYMLINKS option?
- free(): invalid next size (fast), Segmentation Faults (SIGSEGV) and other native Node.js crashes HOT 4
- Purpose of env.AUTHORIZER
- Disable lambda print to console
- Clarity on `identitySource` and `authorization` header in authorizers
- Support lambda direct requests over HTTPS
- Profile X requires multi-factor authentication, but no MFA code callback was provided
- Only top method is used in alb event with multiple methods
- env variables not passed into serverless-offline while debugging with visual studio
- CONVERT_TO_TEXT parameter does not convert binary data of the request to base64
- Lambda functions decode event.payload as utf8 strings for requests with Content-type application/octet-stream
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from serverless-offline.