In a Jenkins Pipeline, I want to block the deletion of a stack until it receives no more traffic. The usage of DNS weights for this is insufficient as callers might use long lived connections.
The metric I'm looking at is RequestCount for load balancers in AWS CloudWatch.
A new service lizzy.app.AWS is introduced here that wraps some functionality of boto3 for convenience. In particular, this service provides the following functionality:
resolving a load balancer given a stack-id (if any)
resolving the request count in the last n minutes of that load balancer
Both, classic and application, load balancers are supported.
Further, a new endpoint is added /stacks/{stack-id}/request_count that first resolves the stack's load balancer and then returnes the request count of it. If the stack can not be found or the stack does not have a load balancer a 404 is returned.
This PR addresses this issue #221:
A new service
lizzy.app.AWS
is introduced here that wraps some functionality ofboto3
for convenience. In particular, this service provides the following functionality:n
minutes of that load balancer Both, classic and application, load balancers are supported.Further, a new endpoint is added
/stacks/{stack-id}/request_count
that first resolves the stack's load balancer and then returnes the request count of it. If the stack can not be found or the stack does not have a load balancer a404
is returned.