Since December 22th 2016 you are able to configure application version lifecycle in Beanstalk.
Very convenient, we can trash our custom api cleaning scripts :-)