Skip to content

Instantly share code, notes, and snippets.

View ChristophShyper's full-sized avatar
Working from home

Krzysztof Szyper ChristophShyper

Working from home
View GitHub Profile
ChristophShyper /
Last active November 22, 2023 17:07
Script returning all public IPs associated with ENI in whole AWS Organization
#!/usr/bin/env python3
import boto3
import botocore.exceptions
Script for counting current usage of public IPv4 across all accounts and regions.
Showing average spent starting January 2024
More info
ChristophShyper / NikCollection.cfg
Last active June 23, 2022 20:38
NIK Collection config file with horrific update prompt disabled
View NikCollection.cfg
<group name="Instrumentation">
<key name="AllowSending" type="bool" value="0"/>
<key name="ShowInstrumentationScreen" type="bool" value="0"/>
<group name="Update">
<key name="Version" type="string" value="4.3.4"/>
<group name="Activation">
ChristophShyper / UBC125XLT-Polish-Aviation.txt
Last active January 3, 2023 21:30
UBC125XLT - Scan125 Scanner Data File - Polish aviation - more at
View UBC125XLT-Polish-Aviation.txt
! Scan125 Scanner Data File - #scan125# - #full#
! Scan125 Control Program © Nick Bailey 2013-2020 V3.3.0.0
! Comments added To this file will be removed!
VER=!Version 1.01.00
ChristophShyper /
Last active February 17, 2021 12:28
Filter AWS accounts for Terraform

Reading and fitlering AWS accounts' attributes with Terraform

To fix hashicorp/terraform-provider-aws#17656 I created a simple script using external data source for Terraform.

Using it I'm able, for example, to list all ACTIVE accounts with IDs or emails.


local {
  accounts_emails = split(",", data.external.accounts.result.Outputs)
ChristophShyper /
Last active July 19, 2020 21:12
Terraform timeouts

Terraform timeouts


Will be executed only on trigger change

resource "null_resource" "first" {

resource "null_resource" "sleep" {
 provisioner "local-exec" {
ChristophShyper /
Last active February 17, 2021 12:24
Pass metadata between Terraform modules using DynamoDB. Only scalar values are possible. Maps or sets will cause issues. Much faster than remote state.

Save metadata in DynamoDB

resource "aws_dynamodb_table_item" "organization" {
  table_name = "my-dyn-db-table"
  hash_key = "KeyName"
  item = jsonencode({
    KeyName = {
      S = "organization"
    Outputs = {
ChristophShyper /
Last active November 13, 2020 17:51
Pass metadata between Terraform modules using S3. Much faster than remote state.

Save outputs from a resource to a YAML file:

# Module Alpha
resource "aws_s3_bucket_object" "outputs" {
  bucket = local.metadata_bucket
  key    = "${local.key_path}/organization.yml"
  content = yamlencode({
    "organization_arn" : aws_organizations_organization.default.arn
 "organization_id" :
ChristophShyper /
Last active February 8, 2023 04:14
List of some repos I find interesting
Repo Description Link
alphagov/aws-auth AWS authentication wrapper to handle MFA and roles
beezz/elastalert-lambda Lambda handler for Yelp's ElastAlert
blueimp/aws-lambda Collection of functions for AWS Lambda
cloudposse/tfmask Terraform utility to mask select output from terraform plan and terraform apply
cytopia/awesome-ci Awesome Continuous Integration - Lot's of tools for git, file and static source code analysis.
cytopia/docker-terraform-docs Alpine-based multistage-build version of terraform-docs and terraform-docs-replace in multiple versions to be used for CI and other reproducible automations
cytopia/docker-terragrunt Alpine-based multistage-build version of Terragrunt and Terr
ChristophShyper / check_ip_and_cidr.ipynb
Last active May 26, 2020 10:24
Google Colab notebook getting external IP plus CIDR and network name from Whois. Great for figuring out CIDR blocks to whitelist for databases access by Colab.
View check_ip_and_cidr.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
ChristophShyper /
Last active March 12, 2020 09:06
My Keybase proof on GitHub

Keybase proof

I hereby claim:

  • I am ChristophShyper on github.
  • I am biotyk ( on keybase.
  • I have a public key whose fingerprint is 7B58 8495 C657 E51B 054B 2085 C9A1 2AA4 E28D AFF1

To claim this, I am signing this object: