Skip to content

Instantly share code, notes, and snippets.

View frangeris's full-sized avatar
👀

Frangeris Peguero frangeris

👀
  • Cloud(x);
  • Buenos Aires
  • 21:22 (UTC -03:00)
View GitHub Profile

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.
@digitaljhelms
digitaljhelms / gist:4287848
Last active April 26, 2024 10:44
Git/GitHub branching standards & conventions

Branching

Quick Legend

Description, Instructions, Notes
Instance Branch
@plentz
plentz / nginx.conf
Last active April 24, 2024 11:15
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@cmawhorter
cmawhorter / troubleshooting.md
Last active February 28, 2024 16:28
Solution to AWS Lambda node.js UnrecognizedClientException "The security token included in the request is invalid."

Troubleshooting AWS unauthorized errors in lambda requests

This is mainly for node.js but might apply to other environments. Unsure.

If you are running a AWS Lambda function that calls another AWS service and getting an error about invalid tokens or other access denied errors, do this:

Check IAM

The role assigned to your lambda function will need permission to perform the actions. Check IAM and make sure the role has all the permissions.

@arunoda
arunoda / gist:7790979
Last active February 16, 2024 14:05
Installing SSHPass

Installing SSHPASS

SSHPass is a tiny utility, which allows you to provide the ssh password without using the prompt. This will very helpful for scripting. SSHPass is not good to use in multi-user environment. If you use SSHPass on your development machine, it don't do anything evil.

Installing on Ubuntu

apt-get install sshpass

Installing on OS X

@DavidWells
DavidWells / serverless.yml
Created December 24, 2017 20:56 — forked from jscattergood/serverless.yml
Creating a custom serverless resource for subscribing to SNS topics in another region
# Welcome to Serverless!
#
# Happy Coding!
service: cross-region-sns-subscriber
# Keep environment specific configurations in separate files
custom: ${file(config/${env:STAGE}.json)}
provider:
@fragoulis
fragoulis / unaccent.rules
Last active June 10, 2022 11:19
Postgres unaccent rules for greek characters
À A
Á A
 A
à A
Ä A
Å A
Æ A
à a
á a
â a
@nhoffmann
nhoffmann / deploy.rb
Created April 3, 2012 14:07
Capistrano recipe for deploying static content.
set :application, "My Static Content"
set :servername, 'test.example.com'
# no git? simply deploy a directory
set :scm, :none
set :repository, "." # the directory to deploy
# using git? deploy from local git repository
# set :scm, :git
# set :repository, 'file//.' # path to local git repository
@IngmarBoddington
IngmarBoddington / xdebug
Last active December 14, 2021 00:05
Xdebug ini settings, functions and general use.
Enable tracing example:
zend_extension="/usr/lib/php5/20090626+lfs/xdebug.so"
xdebug.auto_trace=1
xdebug.trace_output_dir="/tmp/xdebug/"
xdebug.collect_params=4
xdebug.collect_return=1
xdebug.trace_options=1
xdebug.show_local_vars=1
@frangeris
frangeris / commands.md
Last active December 6, 2021 20:15
Common git commands

Common git commands

This is a list of useful commands for git for fast search and ops developers, enjoy and comments for suggest all welcomes :D


Public repo .tar for download versions: https://www.kernel.org/pub/software/scm/git/