This repository has been archived by the owner on Aug 2, 2022. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Support SNS as a destination #348
base: main
Are you sure you want to change the base?
Support SNS as a destination #348
Changes from 2 commits
ec87c81
3ade7cc
ec6cab0
5eaf6ea
1ac39f2
5c2b6c7
558504a
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems a little strange to me. I'm not sure if we should maintain state on using IAM role in the
DestinationType
enum class.It looks like this is mostly used for null assertion in the
SNS
data class. Perhaps you can remove this variable and instead validate if eitherroleARN
oraccess/secret
is set somewhere. It looks like you do something like that inSNSMessage
already, that might be sufficient.And ideally, we should allow the
access/secret
settings to be changed using the reload API and if we support that then you can have scenarios where:access/secret
settings are originally setroleARN
to be null sincesnsUseIamRole = false
)access/secret
settings are removed, checkingroleARN
on any subsequent SNS Destination but now you have one that's already created with a nullroleARN
and noaccess/secret
settings so it bypassed this check.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need this in case the customer uses the indexDestination API to create the SNS destination and we need some validation for the role arn.
Also I have updated the code such that
snsUseIamRole
can change whenever the settings are reloaded.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need
accessDeclaredMembers
? Could you please double check.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is required. The AWS SDK uses jackson databind, which needs
accessDeclaredMembers
.