Sidekiq::Web monitor powered by AWS lambda.
Based on lambda.rb by aws-samples/serverless-sinatra-sample
- ruby(this repository is tested by 2.5.1)
- bundler gem
- redis(for local only)
$ bundle install
$ bundle install --deployment
(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 }
$ 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"