Skip to content

Instantly share code, notes, and snippets.

IAM Tips

Those tips where posted between June and July 2022 on LinkedIn by Roberto Migli.

#IAM tip #1: There are 4 main types of IAM policies: Identity-based policies, resource-based policies, permissions boundaries, Organizations SCPs and Session Policies. Matt Luttrell's blog post will guide you through when and how to use them.

HowAndWhenWithRolesBlog

@sybeck2k
sybeck2k / start-role-session.sh
Last active December 22, 2023 02:29
A script to rapidly test IAM policies
#!/usr/bin/env bash
# MIT No Attribution
# Copyright 2023 Roberto Migli
# 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.
@sybeck2k
sybeck2k / logback-spring.xml
Last active May 27, 2021 15:26 — forked from alexliesenfeld/logback-spring.xml
Spring Boot logging configuration for JSON output
<!--
Make sure you have the logback encoder in your dependencies:
<dependency>
<groupId>net.logstash.logback</groupId>
<artifactId>logstash-logback-encoder</artifactId>
<version>6.2</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
@sybeck2k
sybeck2k / howto.md
Created November 23, 2018 10:32
Mapping an AWS ML real-time Predict entrypoint with API Gateway

Generate your ML Predict entrypoint

You should have an ML Predict entrypoint that can be called via POST with something like:

{
    "MLModelId": "model-id",
    "Record":{
 "key1": "value1",
@sybeck2k
sybeck2k / nomad
Last active June 30, 2017 13:46
nomad init script
#nomad !/bin/bash
#
# nomad Manage the nomad agent
#
# chkconfig: 2345 95 95
# description: Consul is a tool for service discovery and configuration
# processname: nomad
# config: /etc/nomad.conf
# pidfile: /var/run/nomad.pid
@sybeck2k
sybeck2k / gist:f948ab0f52e089735b410fcefa0bb3e2
Last active May 30, 2017 09:29 — forked from blalor/gist:c325d500818361e28daf
redhat init script for consul
#!/bin/bash
#
# consul Manage the consul agent
#
# chkconfig: 2345 95 95
# description: Consul is a tool for service discovery and configuration
# processname: consul
# config: /etc/consul.conf
# pidfile: /var/run/consul.pid
#cloud-config
coreos:
etcd:
# generate a new token for each unique cluster from https://discovery.etcd.io/new
discovery: https://discovery.etcd.io/782a1d6717e57839b5238dda82759736
# multi-region and multi-cloud deployments need to use $public_ipv4
addr: $private_ipv4:4001
peer-addr: $private_ipv4:7001
@sybeck2k
sybeck2k / run.bat
Created June 5, 2014 19:06
Ols 0.9.7 working run.bat!
@echo on
:findJavaSimple
rem Simple check to see whether the "magic" Java binary is available on our path;
java -version > NUL 2> NUL
if errorlevel 1 goto findJavaAdvanced
goto setup
:findJavaAdvanced
rem See <https://github.com/jawi/ols/issues/140>
@sybeck2k
sybeck2k / app.php
Created October 23, 2012 15:31
Add Twig Debug extension in Silex
<?php
//and in your application add:
$app['twig'] = $app->share($app->extend('twig', function($twig, $app) {
$twig->addExtension(new \Twig_Extensions_Extension_Debug());
return $twig;
}));