Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change authorisation mechanism for AWS (ec2-upload-bundle)

I am currently trying to back up my EC2 instance using the Amazon ec2-api-tools and ec2-ami-tools tools utilities.

I am using a standard Ubuntu 14.04 AMI from Amazon.

To download and install the required utilities, I've updated /etc/apt/sources with the following:

deb http://us.archive.ubuntu.com/ubuntu/ trusty multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty multiverse
deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates multiverse

I can now bundle the image as expected, however when I try to upload the AMI to a bucket I receive the following error:

The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256.

I am using the Frankfurt data center. From research online it seems the newer centers as per January 2014 do not support older authentication schemes.

I've tried following the guide at http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html to enabled V4, however when I attempt to update my CLI config I receive the following error:

root@ip-10-0-1-54:/mnt/bundle# aws configure set default.s3.signature_version s3v4
usage: aws [options] <command> <subcommand> [parameters]
aws: error: argument subcommand: Invalid choice, valid choices are:

list   

Does anyone know how to fix there errors so I can back up my bundle to S3?

like image 585
user1220022 Avatar asked Feb 08 '15 20:02

user1220022


1 Answers

The ec2-ami-tools package in the Ubuntu 14.04 repository is outdated. The version in the repository is only version 1.4.0. Frankfurt support was only added in version 1.5.6. The newer version of the tool should work in the Frankfurt region.

This tool is only necessary if you plan on creating instance store-backed AMIs. If your instance is EBS-backed and you need to make an AMI from it, using the AWS CLI will be much easier.

like image 192
Tomasz Kowalski Avatar answered Sep 25 '22 07:09

Tomasz Kowalski