eventrouter icon indicating copy to clipboard operation
eventrouter copied to clipboard

S3Sink - should support instance-profile for bucket access

Open eytan-avisror opened this issue 5 years ago • 2 comments

Currently the s3sink interface panics if s3SinkAccessKeyID / s3SinkSecretAccessKey are not provided.

	case "s3sink":
		accessKeyID := viper.GetString("s3SinkAccessKeyID")
		if accessKeyID == "" {
			panic("s3 sink specified but s3SinkAccessKeyID not specified")
		}

		secretAccessKey := viper.GetString("s3SinkSecretAccessKey")
		if secretAccessKey == "" {
			panic("s3 sink specified but s3SinkSecretAccessKey not specified")

Ignoring the fact that this should probably use a secret vs. a configmap to store this secret, for my use-case I need to use an instance profile to access the bucket.

This will not work with current code as it simply panics.

Suggested change:

  • if key/secret not provided, check if instance-profile is attached
  • if instance-profile is attached and no creds provided, use the instance-profile to try and access the bucket
  • if both not provided (no instance-profile attached) - panic.

Happy to send a PR for this if you are open to having eventrouter support instance-profile for access.

Is this project still active? no release here for the last year+

eytan-avisror avatar Aug 14 '19 23:08 eytan-avisror

s3sink support for instance-profile is appreciated.

jia2 avatar Sep 11 '19 07:09 jia2

I will try to include this in #82

vigith avatar Sep 13 '19 21:09 vigith