implement cap-ec2