This is my customized solution to stop and start AWS EC2 instances. There is solution from Amazon - AWS EC2 Scheduler: https://s3.amazonaws.com/solutions-reference/ec2-scheduler/latest/ec2-scheduler.pdf Example picked from: https://github.com/sangitaccount/AWS/blob/master/cfn-templates/AWS_EC2_ShutStart.template As mentioned in AWS document - https://aws.amazon.com/premiumsupport/knowledge-center/start-stop-lambda-cloudwatch/ I wanted to stop my development instances during night ( 11 PM )and start them in the morning ( 10 AM ). ISSUE 1: In the … Continue reading AWS – Stop Start Instances with Lambda function based on Cloudwatch
Example picked from : https://github.com/sangitaccount/AWS/blob/master/cfn-templates/AWS_AutoScale_ELB_Notification_Single.template In AWS cloud formation template found that there is no parameter type - Boolean. Check the doc from AWS : https://aws.amazon.com/blogs/devops/using-the-new-cloudformation-parameter-types/ While passing - true or false - ansible failing.. example here shows cloud formation template with launch configuration - "AssociatePublicIpAddress" accepts true or false which is self explanatory. PublicORPrivate: True This … Continue reading AWS – Ansible – CF Template Boolean Values Not Accepted
Termination policy comes into picture when there is "Scale UP" OR "Scale Down". Ref:http://docs.aws.amazon.com/autoscaling/latest/userguide/as-instance-termination.html#custom-termination-policy Update Policy is when - Launch configuration is updated. For e.g. update AMI through autoscale group rolling. Ref: https://aws.amazon.com/premiumsupport/knowledge-center/auto-scaling-group-rolling-updates/ Short Description The AWS::AutoScaling::AutoScalingGroup resource supports an UpdatePolicy attribute. This is used to define how an Auto Scaling group resource is updated when an update to … Continue reading AWS Autoscale Termination Policy vs Update Policy
Template - https://github.com/sangitaccount/AWS/blob/master/cfn-templates/AWS_AutoScale_ELB_Notification.template used to create single EC2 Instance with AutoScaling behind ELB. EC2 Instance provisioned ( take a note of AMI ). Using the same Cloud Formation Template I've update the stack with new AMI I did take screenshots of instance changes ( it is keeping the old instance alive till the new instance … Continue reading AWS – AutoScale – Update AMI through CF Template
I am writing Cloud Formation template for web service instances with auto scaling and elastic load balancer. My plan is to place the ELB in public subnet and instances in private subnets behind the load balancer. My private subnets are fully restricted without any NAT Gateway. SSH Access is also enabled through ELB. In Cloud Formation … Continue reading AWS cfn-signal not working in private subnets
We are doing SSL offloading on public facing load balancer - recently received a request to not to allow weak SSL ciphers. If you go to the Load Balancer in question - Listerners section 2. SSL version, SSL Ciphers options can be changed
I've seen instances where instance is not registering to AWS ECS cluster. Check ECS agent running - "docker ps" if not then start it. Check if "ECS_CLUSTER=<cluster_name>" defined in /etc/ecs/ecs.config Remove the file if already exists in /var/lib/ecs/data/ecs_agent_data.json and restart the ECS agent - "restart ecs".