Per the AWS Acceptable Use Policy, penetration testing of EC2 instances:
May be performed by AWS, and will be performed by AWS upon customer request.
May be performed by AWS, and is periodically performed by AWS.
Are expressly prohibited under all circumstances.
May be performed by the customer on their own instances with prior authorization from AWS.
May be performed by the customer on their own instances, only if performed from EC2 instances