def CreateTopic(*, session, topicname):
  """Create SNS topic to which notifications will be published from the pipeline

  :param session: Session to use
  :type session: boto3.Session
  :param topicname: Topic to which the notifications will be published
  :type topicname: string
  :return: Newly created topic
  :rtype: boto3.Resource
  """
  snsconn = session.connect_to("sns")
  Topics = session.get_collection("sns", "TopicCollection")
  topics = Topics(connection=snsconn)
  topic = topics.create(name=topicname)
  # We return the topic so that subscriptions can be created
  return topic