fix bugs
[p5sagit/Oyster.git] / lib / Oyster / Provision / AmazonEC2.pm
index 4ccd509..565e1ec 100644 (file)
@@ -6,12 +6,10 @@ use Net::Amazon::EC2;
 requires 'config';
 
 has 'api_username' => ( is => 'ro', isa => 'Str', required => 1, default => sub {
-    return "AKIAJXSD25MPWFYTQWIQ";
-    confess "Need api_username";
+    die "Need api_username";
 });
 has 'api_password' => ( is => 'ro', isa => 'Str', required => 1, default => sub {
-    return "m76s9DyoXrHdpVy8HkhjgD0RAjy14bhkQ5Zts/gg";
-    confess "Need api_password";
+    die "Need api_password";
 });
 
 has ec2_oyster_key => (is => 'rw', isa => 'Str', default => "OysterDefault");
@@ -28,7 +26,7 @@ sub ec2 {
     
     unless(defined($key_pairs)) {
     
-        print("Creating $ec2_oyster_key key pair\n");
+        print("Creating $self->ec2_oyster_key key pair\n");
         $ec2->create_key_pair({ KeyName => $self->ec2_oyster_key });
     
     }
@@ -43,7 +41,7 @@ sub create {
 
    # Start 1 new instance from AMI: ami-XXXXXXXX
    my $instance = $self->ec2->run_instances(
-       ImageId  => $self->image() or "ami-1a837773",
+       ImageId  => $self->image() or "ami-be6e99d7",
        KeyName  => $self->ec2_oyster_key,
        MinCount => 1,
        MaxCount => 1,