Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Logan Serman committed Dec 16, 2016
2 parents 72985db + 57235f0 commit 796d6df
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/elbas/ami.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,13 @@ def save
def destroy(images = [])
images.each do |i|
info "Deleting old AMI: #{i.id}"
i.delete
delete_snapshots_attached_to i

begin
i.delete
delete_snapshots_attached_to i
rescue AWS::Core::Resource::NotFound
warn "Could not find old AMI '#{i.id}' for deletion"
end
end
end

Expand Down

0 comments on commit 796d6df

Please sign in to comment.