Skip to content

Instantly share code, notes, and snippets.

View luismiv85's full-sized avatar

Luis Miguel Vázquez luismiv85

  • Inteliens
  • Madrid
View GitHub Profile
@luismiv85
luismiv85 / script-lifecycle-action.rb
Last active September 11, 2022 14:54
Control of actions during the aws life cycle
#!/usr/bin/env ruby
################ DESCRIPTION ###############################################################################
# PRECONDITIONS: must exists a lifeCicle to autoscaling called 'lifeCycle-actions-before-shut-down-instance'
# POSTCONDITION:
# Every 10 seconds check if instance lifeCycle status is Terminated
# - if is terminated then
# - do some actions.
# - when all actions are done, then autoscaling lifeCycle is force completed to terminate intance manually
############################################################################################################
@luismiv85
luismiv85 / Gemfile
Last active December 29, 2021 12:25
RPC reply pattern with Ruby, Bunny and RabbitMQ (reply-to)
source 'https://rubygems.org'
ruby '3.0.0'
gem "bunny", ">= 2.19.0"
gem "byebug"
gem 'thread'