Migration in progress

Currently migrating content from Blogger, please excuse the chaos. Excerpts and pagination should now be (mostly) correct, a few other useability improvements are still in progress.

  • 'Connection to s3.amazonaws.com timed out' using VPC S3 Endpoint

    A quick post to point you in the right direction if you are getting connection time out errors using the AWS CLI or Boto with AWS S3 VPC Endpoints in a private subnet.

  • Memcached item memory usage

    I was recently involved with an investigation into a Memcached cluster running on AWS ElastiCache and discovered a few interesting details about Memcached. This post looks at the memory overhead of storing items in Memcached and demonstrates the impact of disabling CAS (check and set) on memory utilisation.

  • C-states and P-states with Ubuntu 14.04 on Amazon EC2

    The largest new generation EC2 instance types now expose C-state and P-state control to the operating system, unfortunately additional complexity is introduced with the added control and this post will discuss some of the issues related to this on Ubuntu 14.04.

  • AWS Tip: Terminating instances in an Auto Scaling group

    EC2 instances launched by Auto Scaling really should not be terminated outside of Auto Scaling but if for some reason you (really, really) need to terminate a number of instances you may see some unexpected behaviour if you terminate them using the EC2 console. Instead of all the instances being replaced by Auto Scaling simultaneously they are replaced individually over a period of time. This means that it may take significantly longer than you would expect to get the ASG back to the original size. As an example an instance in my test ASG was replaced every 2 minutes, taking around 6 minutes to terminate and replace 3 instances.

  • AWS Tip of the day: Working around the S3 "Failed to parse XML document" exception

    If you have S3 objects with Unicode characters that aren't supported by XML 1.0 you are likely to see an exception when calling listObjects in the AWS Java SDK.


    Failed to parse XML document with handler class com.amazonaws.services.s3.model.transform.XmlResponsesSaxParser$ListBucketHandler

  • AWS Tip of the day: Signing requests using IAM instance roles

    If you are averse to having the AWS SDKs conveniently manage IAM instance role permissions and service requests (including Signature V4) then knowing that you need to include the IAM role token in the request header is quite important. This post describes the steps needed to sign an API request using an instance IAM role. It is assumed that you already have an instance launched with a role that has permission to perform the requested API action. For this example the role is going to be named ec2-ro and as the name implies it has read-only permissions on EC2 APIs.

  • AWS script of the day: Core count

    In case you are curious or just want to know how close you are to being a super computer, here is a quick script to count the number of cores an AWS account is currently running.

  • AWS script of the day: Cascade delete of security groups

    A common bug bear of AWS security groups is having to delete all references to a security group before deleting the group itself. Here is a quick boto script to simplify this process, you will need to have configured boto as per these instructions. After which 'python sg_cascade_delete -h' will give you: