Skip to content

Instantly share code, notes, and snippets.

View mungojam's full-sized avatar
💭
Trying out sleet

Mark Adamson mungojam

💭
Trying out sleet
View GitHub Profile
@diriver63
diriver63 / pyodbc-unixODBC-lambda-layer
Last active June 26, 2024 12:50
pyodbc and unixODBC for MSSQL as a lambda layer
# use https://github.com/lambci/docker-lambda to simulate a lambda environment
docker run -it --rm --entrypoint bash -e ODBCINI=/opt/odbc.ini -e ODBCSYSINI=/opt/ lambci/lambda:build-python3.7
# download and install unixODBC
# http://www.unixodbc.org/download.html
curl ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-2.3.7.tar.gz -O
tar xzvf unixODBC-2.3.7.tar.gz
cd unixODBC-2.3.7
./configure --sysconfdir=/opt --disable-gui --disable-drivers --enable-iconv --with-iconv-char-enc=UTF8 --with-iconv-ucode-enc=UTF16LE --prefix=/opt

We (Mozilla Enterprise Information Security team) are encountering a challenge with trying to connect AWS with our identity provider (Auth0) when calling iam:AssumeRoleWithWebIdentity

We've setup an AWS IAM Identity Provider

  • ARN arn:aws:iam::656532927350:oidc-provider/auth-dev.mozilla.auth0.com/
  • Provider type : OIDC
  • Provider URL : auth-dev.mozilla.auth0.com/
  • Audience : xRFzU2bj7Lrbo3875aXwyxIArdkq1AOT

And created an IAM Role with a Trust Relationship policy

@carlgieringer
carlgieringer / integration-request.vtl
Last active June 14, 2022 05:30
AWS API Gateway Integration Request Lambda Proxy (LAMBDA_PROXY) Velocity Template Language (VTL)
## MIT License
##
## Copyright (c) 2017 Carl Gieringer
##
## Permission is hereby granted, free of charge, to any person obtaining a copy
## of this software and associated documentation files (the "Software"), to deal
## in the Software without restriction, including without limitation the rights
## to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
## copies of the Software, and to permit persons to whom the Software is
## furnished to do so, subject to the following conditions:
@ELLIOTTCABLE
ELLIOTTCABLE / .gitignore
Last active July 14, 2023 15:34 — forked from rosston/.gitignore
BASH Script to keep Route53 updated with your current external IP address
*.ip
*.log