add encryption check to ec2 library