code: def gen_component_name(self, basename, postfix_length=13):
          
          def newcname():
              postfix = ''.join(
                      random.choice(_AWS_NAME_CHARS)
                      for i in xrange(postfix_length)
                      )
              return '%s-%s' % (basename, postfix)
          cname = newcname()
          while cname in self.component_names:
              cname = newcname()
          self.component_names.append(cname)
          return cname
docs: Creates a resource identifier with a random postfix.  This is an
          attempt to minimize name collisions in provider namespaces.
  
          :param str basename:  The string that will be prefixed with the stack
              name, and postfixed with some random string.
  
          :param int postfix_length:  The length of the postfix to be appended.