How to Measure Cost Optimization on AWS

Customers pay more and more attention to their cloud bill and usage these days. Today one can launch thousands of instances on AWS to complete a computing job that took years in the past. But one can also launch hundreds of instances sitting in idle. Most of our customers “Lift and Shift” their IT infrastructure to AWS at beginning. They choose gradually to not only optimize the cost but also elasticity in the cloud later. They may have done right-size their EC2, purchased reserve instances or moved away some computing power to spot instances. Perhaps they have replaced existing service […]

Read More

AmazonSQS Third Party Integration with Twillio SMS

Problem: In this blog, we will try to introduce how to use Twilio API to send the verification code to the customer’s mobile device. Since our application was built on top of spring and AWS, we will also explain how to integrate Twilio with Spring-MVC and deploy to AWS. Challenges: There are a couple of difficulties during the implementing process including: Micro-Service Containerization. Integrate and Optimize Twilio APIs in Spring-MVC. Unit Test with Mockito for Third Party Integration. Micro-Service Containerization: The Micro-Service Containerization process would involve modularization and dependency injection in a sense to improve the scalability. There are two […]

Read More

Spring: Quick Tutorial to Integrate Amazon S3 Presigned URL

    Problem: Since all the objects in AWS bucket are secured by default, but we need to access it through the URL to do certain things such as view images or read docs. The normal method is to use public URL to make it. But it’s not secure enough since everyone has unlimited access to it and easy to steal the information on the image. List of solutions Go through all traffic from server-end This is the normal way to get access to the object on the buckets. The client sends requests to the server with credential and server communicate […]

Read More

Passing Resources in Nested Cloudformation

In past few posts, we always automated our stack with cloudformation. Cloudformation template(CFT) is pretty handy tool for engineer to recreate entire stack repetitively. As we wrote more and more cloudformation template for clients, we found a few drawbacks in our monolithic cloudformation template. AWS offer nested cloudformation template. As we converting our template into nested format, we encountered a few challenge like passing resources in nested cloudformation, intrinsic import function. We will walk you through them with comprehensive example as always. Body Size limit – cloudformation has a 51200 bytes body size limit. Duplication – there are some basic resource […]

Read More

Spot Instance 2 minutes termination

We have talked about spot instance to save significantly on EC2 spending at running your stack on Spot Instance and running Spot Fleet + AutoScaling and High Availability. However, spot instance will be recovered by AWS inevitably.  AWS has announced a spot Instance 2 minutes termination notices back in 2015. Although it is not intuitive, it’s one of few way to prevent data loss from accidentally termination in spot.  In this post, we will walk through how to leverage spot Instance 2 minutes termination policy to transit workload without interruption. Run workload on spot instances There are a few ways to launch spot instances. […]

Read More

CI and CD with AWS CodePipeline, CodeBuild and CloudFormation – Part 1 | Continuous Integration & Continuous Delivery

As application grow over the time, most of our clients would like to implement CI and CD in their development workflow. It’s a good way to document the process and reduce human error on repetitive work. It’s also a great way to save the cost. We knew lots of folks have used varies tool like Jenkins to automate Continuous Integration and Continuous Delivery workflow. We’d love to introduce a new approach CI and CD with AWS CodePipeline,CodeBuild and CloudFormation. CodePipeline integrates all popular tools like AWS CodeBuild, GitHub, Jenkins, TeamCity etc. It makes development workflow native to AWSCloud. We were able to “host” our CI […]

Read More

Programmatic Cloudformation Template

We have posted a few ways to cut down your AWS bill earlier. Most of examples were given through cloudformation template, because it is effective and straight forward way to manage environment in AWS. Lots of our enterprise clients start to rise awareness to cloudformation template, as they realize it is one of the critical way to save cost in AWS. Through automating customer’s application environment with cloudformation, we have stumbled upon some limitation, e.g. loop over all available instances type to create launch configuration for each instance type, parameterize template for different application environment to reduce duplication in cloudformation template. It took us some unnecessary […]

Read More

Cost Optimization S3 (AWS Storage) – Simple way to reduce S3 cost without code change

After a few session on how to save cost on EC2, let’s talk about Cost Optimization S3. Storage is a key component in software infrastructure, it needs durability, availability and scalability etc. A common cloud storage choice is S3, we saw all our clients were using S3 but most of them weren’t fully taking advantage of S3 offers in terms of cost saving . We are going to write about a few tricks of Cost Optimization S3 (30%~50% saving) with NO CODE CHANGE REQUIRED. Storage Option Introduction In 2015, AWS team has released “New Lower Cost S3 Storage Option & Glacier Price Reduction”. Let’s take close look […]

Read More

Cost Optimization Spot Fleet + AutoScaling and High Availability

In our last post, we have refactored a sample application to be spot ready. Then we ran its entire stack on spot instances. However, one caveat is if particular spot instances were temporary not available in the market, we would fail back on demand instances in autoscaling group. It’s perfectly okay, but we are going to take cost optimization to the next level. In this post, we will introduce how to improve cost optimization Spot Fleet + autoscaling and also achieve high availability. Cost Optimization Spot Fleet + Docker We did lots of work to convert everything into docker, now it’s time to reap the effort. A better […]

Read More

Running your stack on Spot Instance

We heard a lot buzz around spot instance at Re:Invent in terms of cost optimization, as previous post discussion. In this post, we will talk about running your stack on spot instance. It’s no secret that spot instance is about 80~90% cheaper than On-Demand instance. The downside is spot market fluctuation based on the supply vs demand, instances would be terminated from time to time. How is our stack cope with those interruption? We are going to write three series posts to share our journey. Running your stack on Spot Instance High Availability at spot market fluctuation – Spot fleet+Autoscaling Spot Instance 2 minutes termination Containerize (docker) […]

Read More