Hot answers tagged

15

There are a few different ways to achieve goals of this sort, each with some different tradeoffs. I'm going to describe the most common ones below. The simplest approach is to use Terraform's create_before_destroy mechanism with autoscaling groups. An example of this pattern is included in the aws_launch_configuration documentation. In this scenario, ...


6

If there are 100 messages in the queue and 5 consumers, the initial distribution will be no more than 10-10-10-10-10. A single response can never return more than 10 messages. This seems like a non-issue. Race conditions related to multiple consumers should be a non-issue as well. SQS is designed for multiple simultaneous consumers. Use long polls ...


3

Long polling is always beneficial since it results in higher performance at reduced cost for the majority of use cases. Unfortunately, you cannot control the number of messages each worker receives from the queue due to the distributed nature of the queue. But there are some client-side workarounds that can help you in balancing the load for workers. So, ...


3

Good architecture in how you use SQS queues will solve your problems. If we assume there are, say, 3 minutes of processing per message, then you can almost guarantee equal distribution of the messages as this is very large compared to the time needed to poll the queue, if you delete the message from the queue only after it has been processed. Do be aware ...


2

Try directly accessing https://my-api-lb-111222333.us-east-1.elb.amazonaws.com from your web browser and you'll get a similar error. The SSL certificate is not just used for encryption -- it also verifies that the host is not an impostor, by being consulted in a check of whether the hostname used to access the target matches the hostname of the certificate ...


2

If you’re talking about using a Route 53 ALIAS record, you cannot set the TTL on it, for this reason. It defaults to a low value, and is managed by AWS for you (to the world it appears as an A record, and it will change often). If you’re using a CNAME, then you can set whatever TTL you like. The TTL of the DNS record for the load balancer’s domain will be ...


2

AWS have a specific service to deal with this type of use case, EC2 Systems Manager This allows making base patch sets and then checking they are applied to target systems. "Patch Manager is a fully-managed service (provided at no additional cost) that helps you simplify your operating system patching process, including defining the patches you want ...


1

As people in the comments are saying, you can do this with aws-cli in bash or in the python boto3 library. What about ansible? It has the ability to see your ec2 instances and it could handle the automation for maintenance tasks. If you are not using ansible I highly recommend you add that tool to your DevOps toolbox. Here is how you might structure your ...


Only top voted, non community-wiki answers of a minimum length are eligible