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.
@spr1ne
spr1ne / adapters-post.js
Created August 11, 2016 18:03
[Ember.js] Custom API request
import RESTAdapter from 'ember-data/adapters/rest';
export default RESTAdapter.extend({
/**
* @param {DS.Model} model
* @param {JSON} serializedCommentData
* @returns {*}
*/
postComment(model, serializedCommentData) {
@coreyhaines
coreyhaines / UserAlert.elm
Created January 27, 2017 22:18
User Alerts
module Shared.UserAlert exposing (UserAlert, Msg, show, startShowAlertAnimation, startHideAlertAnimation, default, update, view)
import Helpers exposing (classes)
import Shared.Animation as Animation
import Html exposing (Html, div, span, text)
import Html.Attributes exposing (class)
import Task
type UserAlert
@nqthqn
nqthqn / Ports.elm
Created August 30, 2017 19:28
Porting to Js
port module Ports exposing (..)
import Json.Encode
type alias Key =
String
type alias Value =
@rupertlssmith
rupertlssmith / GameState.elm
Last active October 9, 2024 09:35
Exploring State Machines with phantom types in Elm
module GameState
exposing
( Game(..)
, GameDefinition
, PlayState
, loading
, updateGameDefinition
, updatePlayState
, updateScore
, toReady
@gampleman
gampleman / Collection.elm
Created March 30, 2018 09:44
A module that abstracts over common collection types
module Collection
exposing
( Collection
, isEmpty
, length
, head
, tail
, take
, drop
, slice
@ganapativs
ganapativs / iTerm2 + oh-my-zsh + Pure theme + zsh plugins setup.md
Last active October 5, 2024 03:48
iTerm2 + oh-my-zsh + Pure theme + zsh plugins setup