from datetime import datetime
import uuid


def generate_ami_name(prefix):
	"""
	Generate AMI image name.
	"""

	# current date and time
	now = datetime.now()

	s2 = now.strftime("%Y%m%d%H%M%S")

	x = uuid.uuid4().hex
	postfix = str(x)[:10]
	ami_name = prefix + "-" + s2 + "-" + postfix

	return ami_name