Sidekiq::Web monitor powered by AWS lambda. Only 200+ lines.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.rubocop.yml
.ruby-version
Gemfile
Gemfile.lock
LICENSE
README.md
config.ru
image.jpg
lambda.rb
stack.png
template.yaml

README.md

Sidekiq::Web monitor powered by AWS lambda

site image


stack image


Sidekiq::Web monitor powered by AWS lambda.

Based on lambda.rb by aws-samples/serverless-sinatra-sample

System Requirements

  • ruby(this repository is tested by 2.5.1)
  • bundler gem
  • redis(for local only)

Getting Started

Install Ruby dependencies for this service

$ bundle install

Download the Gems to the local vendor directory

$ bundle install --deployment

Deployment

Upload lambda code to S3 & Create CloudFormation template

(if you don't have a S3 bucket, you need to create one)

$ aws cloudformation package \
    --template-file template.yaml \
    --output-template-file serverless-output.yaml \
    --s3-bucket { your bucket name }

Deploy

$ aws cloudformation deploy --template-file serverless-output.yaml \
    --stack-name { your-stack-name } \
    --capabilities CAPABILITY_IAM \
    --parameter-overrides \
      SecurityGroupIds="{ your security group ids which can access to redis(comma separated) }" \
      VpcSubnetIds="{ your subnet ids which can access to redis(comma separated) }" \
      RedisHost="{ your redis host name }"

example

$ aws cloudformation deploy --template-file serverless-output.yaml \
    --stack-name=hoshino-20181201-sidekiq-web \
    --capabilities CAPABILITY_IAM \
    --parameter-overrides \
      SecurityGroupIds="sg-7a48c603" \
      VpcSubnetIds="subnet-7edf1e29" \
      RedisHost="hoshino-redis.wb790t.ng.0001.apne1.cache.amazonaws.com"