Skip to content

Instantly share code, notes, and snippets.

How to setup AWS lambda function to talk to the internet and VPC

I'm going to walk you through the steps for setting up a AWS Lambda to talk to the internet and a VPC. Let's dive in.

So it might be really unintuitive at first but lambda functions have three states.

  1. No VPC, where it can talk openly to the web, but can't talk to any of your AWS services.
  2. VPC, the default setting where the lambda function can talk to your AWS services but can't talk to the web.
  3. VPC with NAT, The best of both worlds, AWS services and web.
@jhdrn
jhdrn / gist:6192f2c127ae9ac34c6a
Created December 11, 2015 23:10 — forked from theburningmonk/gist:3199252
Simple code lock example in F#
namespace Fsm
open System
open System.Threading
open FSharp.Control
type State = | Locked of int list
| Open
| Closed
@jhdrn
jhdrn / gist:691163a1630d10b7d14b
Created October 1, 2015 15:06 — forked from dsyme/gist:9b18608b78dccf92ba33
Working self-contained getting-started sample for Suave Web Scripting
//==========================================
// Working fully self-contained getting-started example for Suave Web Server scripting
//
// Note you don't need to have _anything_ installed before starting with this script. Nothing
// but F# Interactive and this script.
//
// This script fetches the Paket.exe component which is referenced later in the script.
// Initially the #r "paket.exe" reference is shown as unresolved. Once it has been
// downloaded by the user (by executing the first part of the script) the reference
// shows as resolved and can be used.
@jhdrn
jhdrn / gist:c420cb9113caa0b36f8a
Last active August 29, 2015 14:23 — forked from liamcurry/gist:2597326
Moving from jQuery

Moving from jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})