Howto disable hotlinking for your AWS S3 resources

It is good idea to serve static content (e.g. images, video, …., not a JavaScript files) on AWS S3 instead of from your AWS EC2 server. In this case you reduce the workload on your web application.

The problem is that AWS S3 resources are not available for public by default.

The simple stupid solution is to make them all publicly available.

But what if we are talking about protected Web application where clients should enter credentials first to access the application. And one of the requirement is that all data should be not easily available! E.g. shouldn’t be referenced by other sites (hotlinking) or crawled by the search engines.

AWS S3 for everyone doesn’t work here.

Fortunately you can create the AWS S3 bucket policy which will allows to access the resources only for the particular referrers:

 "Version": "2008-10-17",
   "Id": "Vlasenko Access",
   "Statement": [
     "Sid": "AllowPublicRead",
     "Effect": "Allow",
     "Principal": {
       "AWS": "*"
     "Action": "s3:GetObject",
     "Resource": "arn:aws:s3:::TestPolicy/*",
     "Condition": {
       "StringLike": {
         "aws:Referer": [

The image above available only trough this blog post. Try to copy the URL and paste it into a new tab in your browser. Don’t use Open link in new Tab!

Amazon RDS Now Supports T2 Instances

That is good news.

T2 instances CPU credits is really great feature introduced 2 months ago for EC2. Amazon RDS Now Supports T2 Instances

At the same time the price for T2 RDS instances is twice less then for the previous generation.

T2.micro EC2 + T2.micro RDS are good if you are thinking about web app which will have the “scheduled” workload. E.g. the main customers are from the particular region.

While the instance is IDLE it accumulate CPU credits. And you servers will be able to burst above the baseline as needed. You can track your CPU Credits trough AWS Console. It is really fun to track them

On the image below one of my EC2 instance has 150 CPU Credits. This means that it will be able to rocket up to the “cloud”  if needed. But still you pay for micro instance. CPU Credits really brilliant idea from Amazon!


From Evolution to Inevitolution by Dmitri Dozortsev

Originally posted on Fertility Conundrums

Civilization development is driven by scientific discoveries which have to inevitably happen. One human being has very little value for this inevitability: individual human’s only intrinsic inevitable quality is death. As number of humans was small, it was taking a long time from one discovery to another. For example, it took thousands of years to exit the stone age and enter bronze age. The man who came up with the first stone tool had no competition for thousands of years. Today, when I get a “new” idea in my small and highly specialized field, I can be assured with 99% certainty that someone had exactly the same idea a few days or perhaps few years ago. It becomes incredibly hard to be original … which means that all possible discoveries became inevitable. This inevitability of increased complexity of civilization is not directed by anything or anybody, but an intrinsic property of a large group of humans: everything that can be discovered advancing humanity to an unknown, unpredictable and yet inevitable finale.  We do not know who will make a discoveries, we don’t know how it will happen, but they will happen with absolute certainty. Just like in quantum mechanics, everything that can happen will happen, given enough time.

This increase of complexity is not only inevitable, but the speed with which inevitable outcome is achieved is continuously accelerating by virtue of population increase.