Showing posts with label amazon. Show all posts
Showing posts with label amazon. Show all posts

Wednesday, 9 November 2011

s3cmd : Delete all files in a bucket


Unfortunately, s3cmd cannot delete files with a wildcard.  You cannot just

s3cmd del s3://my-bucket/*

Well, you can, s3cmd will also report "Object * deleted" but all your files stay in the bucket!
I know why guys in Amazon decided to do so but that is a long story, let's go back to practice.
I suggest a unix-way here (well, I would suggest it anyway):

s3cmd ls s3://my-bucket/  | awk '{print $4}' | xargs s3cmd del

That is all, You will get list of files in an output.

Another way, is to "s3cmd sync" your bucket against an empty directory

Monday, 26 September 2011

Amazon AWS tricks as seen by noob


Every product has  a fine print today, just go to a local store and see. Amazon AWS is not an exception  and has some interesting, I would say, "features" that you should know about.

1) Each time you press Start or call start() from  API on instance you are IMMEDIATELY charged for the first hour. Hence if you make 10 star/stop during 20minutes you are charged for 10 hours.

Better example:

0:00 - start
0:10 - stop
0:20 - start
0:30 - stop
0:40 - start
0:50 - stop

Bill - 3  hours

2) You CAN run 64 bit image on Micro instance(t1.micro) but you CANNOT run it(64 bit image) on Small (m1.small) and Medium (c1.medium) instances. Do not expect  to upgrade 64bit Micro instance to small or medium, you can upgrade it only to Large and so on.



Well, these features are not game-changers but remember that it is better to keep instance running till the end of hour.




Friday, 9 September 2011

Amazon EC2 Endpoint URLs for HybridFox

hybridfox seems to have active development, at least you don't have to edit supported firefox version in install.rdf to get  it on Firefox 6+. Also people seem to use it more for Eucalyptus private cloud it can serve as 100% replacement for ElastiFox. With hybridfox everything looks the same but here is one big difference, it expects you to input  "Endpoint URL" (that is URL where Cloud API reside, it can be EC2_URL of Eucalyptus, for example).  I spent some time in search of these URLs for actual Amazon regions but found nothing better then just to steal the list from old ElastiFox


us-east-1  - https://us-east-1.ec2.amazonaws.com,
eu-west-1 - https://eu-west-1.ec2.amazonaws.com,
us-west-1 - https://ec2.us-west-1.amazonaws.com,
ap-southeast-1 - https://ec2.ap-southeast-1.amazonaws.com,
ap-northeast-1 - https://ec2.ap-northeast-1.amazonaws.com



PS. If you already had Elastifox installed, you can try Hybridfox, It will take all your preferences and settings.