Question: Hi all. I've started using Packer to create immutable images for deployments. I also have a script to update the new AMI into a launch-config and ASG. I now need a way to trigger a recycle in the ASG so it brings down old machines and brings up new ones with the new AMI. What is the best approach to do this?

Asked By
ayushsharma22
Asked At
2017-09-04 07:52:54

Found 15 possible answers.

User Answered At Possible Answer
joseluis.ledesma 2017-09-04 08:21:17 @ayushsharma22 if you have "OldestInstance" termination policy, you just have to add the same number of servers you currently have and make it grow, meanwhile you shrink the other another way is to create another AG attached to the same ELB
calvin 2017-09-05 07:57:43 hi, we are running multiple aws services for a number of our customers and are looking for a way to split our invoices into the customer/project related costs to be able to charge our individual customer for the service they are using, we tried that via tags but there seem to be some services that can not be tagged (redis in elasticache for example), we also looked into the organisation feature but aren’t really sure if this could be the solution, are there any best practices/tools/articles on this topic or any advice at all?
mihail-velikov 2017-09-05 07:59:23 depends on your setup then the discount will be applied this would mean that it would first summed up to 100Tb so for example lets say you have 100 accounts each using 1 Tb of s3 storage each i mean from all the resources and the best part of all this is that no matter how many AWS accounts you have generated bulk pricing is calculated on the sum of accounts if you want to be really precise you could write your own logic to try understand how much does each customer use from the shared resources :slightly_smiling_face: in case there are shared services then you put them in one AWS account and then separate the bill per customer how I would approach the problem would be to separate each customer in a different account, this way you will know exactly how much they use using the AWS Organizations it is currently very easy to programatically create new AWS accounts and centralise the billing in your case it depends if you have customers using shared resources for most people the tagging scheme works pretty well
calvin 2017-09-05 08:06:41 that’s actually pretty cool, i agree guess we’ll have to look further into organisations thanks for the info
ayushsharma22 2017-09-05 12:42:07 Is there a way to find out if an AWS ELB instance is responding to traffic? I mean the Amazon ELB instances, not the user application ones we place under it. I read somewhere we could issue a PATCH to the ELB instance and it would respond with a 405 Method Not Allowed, indicating that the instance was at least responding to traffic, but that doesn't seem to work anymore. Any other ideas?
joseluis.ledesma 2017-09-05 12:54:44 @ayushsharma22 I don't know if it will work for you, but in cloudwatch you can look for ELB statistics by AZ
vince 2017-09-05 12:54:55 @ayushsharma22 you could enable VPC Flow Logs (assuming you're not in EC2 Classic)
joseluis.ledesma 2017-09-05 12:54:57 normally there is one node per AZ (althouth it can be more)
vince 2017-09-05 12:55:26 that'll let you know, at least at a network level, if the ELB is receiving requests or enable ELB access logs
ngurjar 2017-09-05 14:14:13 Hi All, Currently I am doing curl to ELB but feel not full proof. What should be the best programmatic way to Identify that AWS region is down for triggering DR site ?
pbullian 2017-09-05 14:15:57 down in what sense? do you have ec2 there? I think it's always better to check with the aws api
ngurjar 2017-09-05 14:17:34 There will be multiple services such EC2, route53, SNS, SQS, etc. There will be multiple services such EC2, route53, SNS, SQS, etc. Currently I am doing curl to ELB but feel not full proof. What should be the best programmatic way to Identify that AWS region is down for triggering DR site ? [September 5th, 2017 7:14 AM] ngurjar: Hi All,
joseluis.ledesma 2017-09-05 14:17:51 we use metadata (requesting from an ec2 instance) curl http://169.254.169.254/latest/meta-data/placement/availability-zone
ngurjar 2017-09-05 14:22:31 I think this command we cant run remotely, we need to run on same AZ
joseluis.ledesma 2017-09-05 14:27:10 right, it have to be ran on the ec2 instance

Related Questions