def declare_s3_bucket_resources(bucket_name)
      # If shared s3 bucket resources have already been declared.
      # We will not generate them again. However, we still need to always
      # add the depends_on declaration to ensure that the shared stack parameters
      # are properly passed to the nested child stack.
      stack_name = s3_events[bucket_name] # already registered
      if stack_name
        depends_on stack_name.underscore.to_sym, class_prefix: true # always add this
        return stack_name
      end

      # Create shared resources - one time
      stack_name = declare_shared_s3_event_resources(bucket_name)
      depends_on stack_name.underscore.to_sym, class_prefix: true # always add this
      self.s3_events[bucket_name] = stack_name # tracks buckets already set up
    end
def declare_s3_bucket_resources(bucket_name)
      # If shared s3 bucket resources have already been declared.
      # We will not generate them again. However, we still need to always
      # add the depends_on declaration to ensure that the shared stack parameters
      # are properly passed to the nested child stack.
      stack_name = s3_events[bucket_name] # already registered
      if stack_name
        depends_on stack_name.underscore.to_sym, class_prefix: true # always add this
        return stack_name
      end

      # Create shared resources - one time
      stack_name = declare_shared_s3_event_resources(bucket_name)
      depends_on stack_name.underscore.to_sym, class_prefix: true # always add this
      self.s3_events[bucket_name] = stack_name # tracks buckets already set up
    end
Returns stack_name