Tag Archives: openwhisk
React to Database Changes with OpenWhisk Actions
Handle Webhooks with Serverless PHP
I included an example of a serverless endpoint to receive incoming webhooks in my talk at PHPUK last week and I got a few questions about it so I thought I’d share that example in written form. Continue reading
Deploying OpenWhisk Actions With Dependencies
package.json
since this can specify the entry point if it’s not index.js
which is the default.
Package Parameters in OpenWhisk
One OpenWhisk Action Calls Another
Alexa Project Name Generator on OpenWhisk
Configuring Skills
There are a bunch of good resources around for setting up skills, picking the name, configuring the “invocation” which is what to say to make the code happen, and so on. I’ll skip this section and instead just share a couple of tutorials that I rely on a lot:
- https://jordankasper.com/building-an-amazon-alexa-skill-with-node-js/
- https://medium.com/@bthdonohue/build-your-first-alexa-skill-8a37dc3103d6#.h8ftaj84z
Once your skill is configured, it’s time to write the code (note: UK users need to pick English (UK) and not English (US) as otherwise your skill will mysteriously fail in your home region. Guess how I learned that??) Continue reading
One-Line Command For Newest OpenWhisk Logs
wsk activation list -l1 | tail -n1 | cut -d ' ' -f1 | xargs wsk activation logs
From left to right, sections separated by the pipe |
character, this is what happens:
- get a list of activations, limited to just one activation (it sorts the newest one first by default)
- grab only the last line of that output (there’s some extra titles and stuff in there)
- use the `cut` command with the space character as a field delimiter, and use only the first field (this gets the ID of the activation)
- get the logs of that activation
Of course it’s wrapped up in a script so I just run that from the commandline and check where I went wrong this time …