Why is the AWS CLI showing “A client error (PermanentRedirect) occurred” when trying to access S3?

Problem: When trying to access S3 via the AWS CLI tools, you’re able to get a list of buckets, but can’t do anything else without seeing a “PermanentRedirect” error: $ aws s3 ls 2011-06-22 16:25:23 bucket1 2011-07-26 21:34:43 testbucket 2012-08-20 17:05:32 mybucket $ $ aws s3 ls ‘s3://mybucket’ A client error (PermanentRedirect) occurred when calling …

Continue reading ‘Why is the AWS CLI showing “A client error (PermanentRedirect) occurred” when trying to access S3?’ »

How do I launch an EC2 instance in VPC from the command line?

Before launching the instance, we need to configure several parameters, and note their values: Look up the allocation ID of the new Elastic IP address. Look up the subnet-id of the subnet you want to use (subnet-xxxxxxxx): root@puppet:~# aws ec2 describe-subnets –output=text –filters=”Name=cidrBlock,Values=172.16.1.0/24″ SUBNETS us-west-2a 249 172.16.1.0/24 False False available subnet-00000000 vpc-00000000 TAGS Name 172.16.1.0 …

Continue reading ‘How do I launch an EC2 instance in VPC from the command line?’ »

How do I use internal Amazon addresses with DNS?

The Problem: When you spin-up a new Amazon EC2 server instance, a public IP is automatically assigned to it. If you want to assign a more “permanent” IP to it, you can use Elastic IP’s. Either way, you end up with an “internal” (10.x.x.x or 172.16.x.x) IP address and a “public” Internet-routable IP address for …

Continue reading ‘How do I use internal Amazon addresses with DNS?’ »

How can I add a resizable disk to my EC2 server?

Discussion EC2 Volumes CANNOT be resized. If you require the flexibility of resizing your mounted Linux data disks on-the-fly, while the server is running, you can use Linux’s “built-in” LVM subsystem to make a concatenated disk composed of multiple virtual disks, each an EBS volume. When you need more space, you just allocate an additional …

Continue reading ‘How can I add a resizable disk to my EC2 server?’ »

How can I connect two AWS accounts together?

Introduction I have two Amazon AWS accounts, each with a VPC. Can I connect two VPCs is different accounts together? Amazon doesn’t provide a manner to route traffic between VPCs in different accounts, but you can set up a “tunnel” yourself using two EC2 servers as “gateways” using the OpenSWAN VPN. OpenSWAN is a free, …

Continue reading ‘How can I connect two AWS accounts together?’ »