code: func BucketVersioningEnabled(awsSession *session.Session,
  	S3Bucket string,
  	logger *logrus.Logger) (bool, error) {
  
  	s3Svc := s3.New(awsSession)
  	params := &s3.GetBucketVersioningInput{
  		Bucket: aws.String(S3Bucket), // Required
  	}
  	versioningEnabled := false
  	resp, err := s3Svc.GetBucketVersioning(params)
  	if err == nil && resp != nil && resp.Status != nil {
  		// What's the versioning policy?
  		logger.WithFields(logrus.Fields{
  			"VersionPolicy": *resp,
  			"BucketName":    S3Bucket,
  		}).Debug("Bucket version policy")
  		versioningEnabled = (strings.ToLower(*resp.Status) == "enabled")
  	}
  	return versioningEnabled, err
  }
docs: // BucketVersioningEnabled determines if a given S3 bucket has object
  // versioning enabled.