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.
@wesky93
wesky93 / full-ffmpeg.sh
Created July 18, 2017 04:19
Install full ffmpeg in debian wheezy (with aac(m4a) and x264 support)
# Add multimedia source
echo "deb http://www.deb-multimedia.org wheezy main non-free" >> /etc/apt/sources.list
echo "deb-src http://www.deb-multimedia.org wheezy main non-free" >> /etc/apt/sources.list
apt-get update
apt-get install deb-multimedia-keyring # if this aborts, try again
apt-get update
# Go to local source directory
cd /usr/local/src
@wesky93
wesky93 / python361.md
Last active June 2, 2017 14:53 — forked from basaks/python36.md
Install Python3.6 interpreter on ubuntu 16.04

Install Python3.6 interpreter on ubuntu 16.04

From here, we can pretty much follow the exact same procedure.

On a terminal just do the following steps:

Install dependencies:

sudo apt install build-essential checkinstall libreadline-gplv2-dev \

@wesky93
wesky93 / FTP sync.py
Created September 24, 2015 07:56 — forked from Gerzer/FTP sync.py
Pythonista FTP sync
import ui
import console
import keychain
import ftplib
import os
import re
import time
from datetime import datetime
global cur_dir
cur_dir = os.path.abspath(os.getcwd())
@wesky93
wesky93 / PythonistaFTP.py
Created September 24, 2015 07:56 — forked from omz/PythonistaFTP.py
PythonistaFTP.py
'''FTP server for Pythonista (iOS)
You can use this to exchange files with a Mac/PC or a file management app on the same device (e.g. Transmit).
If you use a Mac, you can connect from the Finder, using the "Go -> Connect to Server..." menu item.
'''
import os
from socket import gethostname