Skip to content

Instantly share code, notes, and snippets.

View bkdinoop's full-sized avatar

Dinoop Balakrishnan bkdinoop

View GitHub Profile
@atheiman
atheiman / cloudformation.gitlab-ci.yml
Last active February 11, 2024 01:24
GitLab CI CloudFormation Deploy Job
.cloudformation:
stage: cloudformation
variables:
AWS_DEFAULT_REGION: ''
CFN_ASSUME_ROLE_ARN: ''
CFN_TEMPLATE: cloudformation/template.yml
CFN_STACK_NAME: 'MyStack'
CFN_DEPLOY_EXTRA_ARGS: ''
image:
name: amazon/aws-cli
#!/bin/bash
# wrapper around "aws cloudformation" CLI to ignore certain pseudo-errors
# aws cloudformation deploy exits with 255 for "No changes to deploy" see: https://github.com/awslabs/serverless-application-model/issues/71
# this script exits with 0 for that case
STDERR=$(( aws cloudformation "$@" ) 2>&1)
ERROR_CODE=$?
echo ${STDERR} 1>&2
@garnaat
garnaat / untagged_instances.py
Created October 17, 2014 15:52
Find all untagged EC2 instances
import skew
for instance in skew.scan('arn:aws:ec2:*:*:instance/*'):
if not instance.tags:
print('%s is untagged' % instance.arn)