Module: AwsExtensions::S3::BucketNotification

Defined in:
lib/aws_extensions/s3/BucketNotification.rb

Instance Method Summary collapse

Instance Method Details

#to_cumulusObject

Public: Convert this Aws::S3::BucketNotification into an array of Cumulus::S3::NotificationConfig

Returns the array of NotificationConfigs



10
11
12
13
14
15
16
17
18
19
20
# File 'lib/aws_extensions/s3/BucketNotification.rb', line 10

def to_cumulus
  Hash[(
    lambda_function_configurations +
    queue_configurations +
    topic_configurations
  ).map do |configuration|
    cumulus = Cumulus::S3::NotificationConfig.new
    cumulus.populate!(configuration)
    cumulus
  end.map { |configuration| [configuration.name, configuration] }]
end