Code smartly to avoid exceed AWS request rate


Have your http calls ever been throttled by AWS? If not, congratulations! And if you are curious about what it looks like, here you go: Below is what AWS says about the EC2 request rate limits. The same principal applies to other AWS services, e.g Autoscaling group, in which I encountered the rate exceeded problem. … Continue reading Code smartly to avoid exceed AWS request rate

Run autoscaling group on spot instance in a smart way


Spot fleet is good, but it may not fit every use case. E.g you can not easily shutdown the non-prod environment with spot fleet, due to its scalable target only allows 1 - 3000. In some scenarios, running autoscaling group on spot instance is a better way to go. And essentially, it is all about the … Continue reading Run autoscaling group on spot instance in a smart way

Bamboo plan for AWS build part 4


Swap URL: This is for blue/green deployment. The idea is to update the floating DNS to point to different stack's ELB CNAME. It allows us to easily divert the traffics to different backend stack, but keep it transparent to users. Cloudformation snippet "Resources": { "Route53DNSRecord": { "Properties": { "Comment": "Floating DNS Record", "HostedZoneName": { "Fn::Join": … Continue reading Bamboo plan for AWS build part 4

Bamboo plan for AWS build part 3


Continue with the Bamboo plan for AWS build, now it is time to look into the deployment plan. For each environment, I got 4 sub plans: Create Stack, Deploy Config, Swap URL and Delete Stack. Create Stack: As explained in the part 1, Stack means the infrastructure. e.g A Nginx stack has those components: ELB, Autoscaling … Continue reading Bamboo plan for AWS build part 3