s3trigger

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 18, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package s3trigger provides utility functions to trigger S3 notifications on demand

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLambdaArnsForBucket

func GetLambdaArnsForBucket(bucket string) ([]*string, error)

GetLambdaArnsForBucket returns a list of lambda ARNs associated with bucket

func InvokeLambdaArnForRecords

func InvokeLambdaArnForRecords(records []events.S3EventRecord, arn *string) error

InvokeLambdaArnForRecords calls the lambda ARN with the records as the S3 event

func InvokeLambdaArnsForRecords

func InvokeLambdaArnsForRecords(records []events.S3EventRecord, arns []*string) error

InvokeLambdaArnsForRecords calls InvokeLambdaArnForRecords for each of the arns with the event records

func NewLambdaRecordForObject

func NewLambdaRecordForObject(bucket string, object *s3.Object) events.S3EventRecord

NewLambdaRecordForObject generates the S3 ObjectCreated event record expected by a lambda function based on the bucket and object provided.

func TriggerLambdaArnsForBucket

func TriggerLambdaArnsForBucket(bucket string, arns []*string) error

TriggerLambdaArnsForBucket invokes each lambda ARN for each key contained in bucket in batches of 10 (currently the maximum in AWS)

func TriggerLambdaArnsForBucketWithPrefix added in v0.1.1

func TriggerLambdaArnsForBucketWithPrefix(bucket string, prefix string, arns []*string) error

TriggerLambdaArnsForBucketWithPrefix invokes each lambda ARN for each key staring with the prefix and contained in bucket in batches of 10 (currently the maximum in AWS)

func TriggerLambdasForBucket

func TriggerLambdasForBucket(bucket string) error

TriggerLambdasForBucket invokes all lambda functions associated with bucket for each key contained in the bucket.

func TriggerLambdasForBucketWithPrefix added in v0.1.1

func TriggerLambdasForBucketWithPrefix(bucket string, prefix string) error

TriggerLambdasForBucketWithPrefix invokes all lambda functions associated with bucket for each key starting with prefix in the bucket.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL