AWS Lambda Triggers

The GUI has changed recently and it’s not as easy to find them.

They’re now in Lambda > Functions > Configuration in the Designer pane.

Assuming you’ve added a Trigger from the list on the left, then, to Enable, click on the Trigger and change it to Enabled. 300w, 768w, 588w, 1143w" sizes="(max-width: 474px) 100vw, 474px" />

AWS Lambda Handler

The Handler function for an AWS Lambda is specified by using the filename then function name. E.g. if the file is and the handler function is then you’d use:


Note, the defaults, if using the AWS console are lambda_function.lambda_handler.


vim – indent after curly brace, set tab to 4 spaces

Primer on Go



cd $HOME/go/src/hello

go build




and more idiomatically:


*string => pointer to a string

&message => use the memory location of the variable message

so this returns

Hello all%!(EXTRA *string=0xc42007a1c0)

whereas this:

returns the value. i.e.

Hello all%!(EXTRA string=Hello all)

Basic User Types

type Salutation string

or a more complex example:

type Salutation struct {

name string

greeting string


func main() {

var a = Salutation{name: “Bob”, greeting: “Hi” }



Getters / Setters and Scope

There are no Getters / Setters.

A capitalised variable is publicly visible from a package. E.g. Salutation.

Lowercase is not visible.



Note on iota. This is used in const delarations to increment numbers.

A better example of using iotais probably this:

Note the implicit iotain the const for subsequent Weekdays.


  • Multiple return values
  • Use like any other type
  • Function literals

Note: function literals aka lambdas or closures are functions without a name.

E.g. of function declaration:

package main

import "fmt"

type Salutation struct {
    name string
    greeting string

func Greet(salutation Salutation) {

func main() {
    var s = Salutation{name: "Bob", greeting: "Hi" }



tree – only show files with matching file name but not directories that don’t contain the file

I want to use tree to only show files that match a specific file name. E.g. filename.

The man page says:

However, I don’t want to show  directories that don’t contain that file.

Here’s how:

tree . -P filename --prune

and if you want to match on directories too then use:

tree . -P *match string* --matchdirs --prune


Your branch is ahead of by x commits – what’s changed?

So you do a git status and you see:

How do you check to see what you’ve changed (i.e. local and remote)?