RDS - Restoring Large Dumps on a MySQL Database

 — 

During a full stack migration from a standard data center to AWS for a customer last week, I had to restore some MySQL dumps with a total size around 40 Gigabytes.

On the beginning of the process it started to fail with the following message:

MySQL server has gone away ...

Category: posts Tags:

S3 policy for public access

 — 

To allow public access to all objects in your bucket set the policy bellow accessing:

Bucket Properties >> Permissions >> Edit bucket policy

Policy:

{
    "Version": "2008-10-17",
    "Statement": [
        {
            "Sid": "",
            "Effect": "Allow",
            "Principal": {
                "AWS": "*"
            },
            "Action": [
                "s3:List*",
                "s3:Get*"
            ],
            "Resource": [
                "arn:aws:s3:::<bucket_name>/*",
                "arn:aws:s3:::<bucket_name>"
            ]
        }
    ]
}

Cheers! :)

Category: posts Tags:

Transparently using memcached for PHP sessions

 — 

I recently had to make a migration for a website hosted on a multi-service VPS (oh, god... why???) to a simple AWS infrastructure (ELB, Autoscale, Launch Configuration, RDS, etc...).

During the planning phase the subject of PHP sessions over volatile nodes comes up. The standard way to deal with it ...

Category: posts Tags:

Accessing private RDS instances from outside using Socat

 — 

Let's say that your client, after some time running with an MySQL RDS set to private access only, wants to do small changes on the databases hosted there, but don't want to write the necessary SQL script to do the changes from inside one of the EC2.

So ...

Category: posts Tags:

FizzBuzz

 — 

"Write a program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of both three and five print “FizzBuzz”."

Python:

for i in range(1, 100):
    if ...
Category: posts Tags:

© Leon Waldman 2015

Powered by Pelican