Skip to content

Instantly share code, notes, and snippets.

View rcbop's full-sized avatar

Rogerio Peixoto rcbop

  • Spain
View GitHub Profile
############################################################################################################
################## #############################
################## #############################
This Gist collection contains all localstack related examples
################## #############################
################## #############################
############################################################################################################
@hermanbanken
hermanbanken / Dockerfile
Last active April 22, 2024 10:53
Compiling NGINX module as dynamic module for use in docker
FROM nginx:alpine AS builder
# nginx:alpine contains NGINX_VERSION environment variable, like so:
# ENV NGINX_VERSION 1.15.0
# Our NCHAN version
ENV NCHAN_VERSION 1.1.15
# Download sources
RUN wget "http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz" -O nginx.tar.gz && \
@RobertoSchneiders
RobertoSchneiders / elasticbeanstalk_deploy_iam_policy.md
Last active October 11, 2023 11:35
IAM Policy for deploy on Elastic Beanstalk

I am deploying with this IAM using Codeship and Circle CI to Elastic Beanstalk. I had a lot of trouble with this config. I talked to the aws support for about 6 hours until this worked properly, so, I guess it is worth to share.

UPDATE: In the end, I have to use the AWSElasticBeanstalkFullAccess policy. My custom policy keep breaking every week with some new added permission or some EB internal change. Anyway, the IAM I was using is below.

This works for me with CircleCI and EB Cli.

{
    "Version": "2012-10-17",
    "Statement": [
        {
@ianblenke
ianblenke / prune_eb_versions.sh
Last active March 8, 2019 16:46
Delete any ElasticBeanstalk application versions older than a week old that are not currently in use by an environment.
awsargs="--profile aws-dev --region us-east-1"
now=$(date -j -f "%a %b %d %T %Z %Y" "$(date)" "+%s" 2>/dev/null);
oneweekago=$(expr $now - 604800);
aws elasticbeanstalk describe-application-versions $awsargs | \
jq -r '.ApplicationVersions[] | .ApplicationName + " " + .VersionLabel + " " + .DateCreated'| \
while read line ; do
fields=( $line )
utime=$(date -j -f %Y-%m-%dT%H:%M:%S "${fields[2]};" "+%s" 2>/dev/null);
if [[ $utime -lt $oneweekago ]]; then
if [ -n "$(aws elasticbeanstalk describe-environments $awsargs \
@rbanks74
rbanks74 / ebs-snapshot.sh
Created May 1, 2015 17:24
Copy of CaseyLabs/aws-ec2-ebs-automatic-snapshot-bash
#!/bin/bash
export PATH=$PATH:/usr/local/bin/:/usr/bin
# Safety feature: exit script if error is returned, or if variables not set.
# Exit if a pipeline results in an error.
set -ue
set -o pipefail
## Automatic EBS Volume Snapshot Creation & Clean-Up Script