Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for sns and sqs to s3_bucket_notification #140

Closed
TC-robV opened this issue Jul 15, 2020 · 8 comments · Fixed by #940
Closed

add support for sns and sqs to s3_bucket_notification #140

TC-robV opened this issue Jul 15, 2020 · 8 comments · Fixed by #940
Labels
affects_2.10 feature This issue/PR relates to a feature request module module plugins plugin (any type) waiting_on_contributor Needs help. Feel free to engage to get things unblocked

Comments

@TC-robV
Copy link

TC-robV commented Jul 15, 2020

SUMMARY

s3_bucket_notification currently only supports adding events that go to lambda. s3 events can also go to sns or sqs.

ISSUE TYPE
  • Feature Idea
    add support for sns and sqs notification events
COMPONENT NAME

s3_bucket_notification

ADDITIONAL INFORMATION
@duderamos
Copy link
Contributor

This module is described to support lambda only, as in the documentation: This module allows the management of AWS Lambda function bucket event mappings via the Ansible framework. However, its name is more generic than that, and by checking its counterpart in boto3 API, it should support a list of lambdas, queues and topics (https://boto3.amazonaws.com/v1/documentation/api/1.9.42/reference/services/s3.html#bucketnotification).

I am more than happy to expand this module to accommodate queues and topics too. What do you think @TC-robV @tremble ?

@ansibullbot
Copy link

@ansibullbot ansibullbot added affects_2.10 feature This issue/PR relates to a feature request module module needs_triage labels Aug 19, 2020
@ansibullbot ansibullbot added the plugins plugin (any type) label Aug 27, 2020
@kreno911
Copy link

kreno911 commented Jan 5, 2021

Has anything been done with this?
We are stuck trying to add permissions to buckets in ansible for notifications to SNS and SQS objects...

@goneri goneri added waiting_on_contributor Needs help. Feel free to engage to get things unblocked and removed needs_triage labels Feb 10, 2021
@goneri
Copy link
Member

goneri commented Feb 10, 2021

Thank for the issue.

@duderamos, do you want to push a PR to cover this use-case?

@andrew-pickin-epi
Copy link

Waiting on contributor for nearly a year. Think it's safe to assume this is stalled.
This is a the first time I've hit a problem with ansible aws modules that teraform supports well.
It would be nice if this could be unstalled.

@ansibullbot
Copy link

@alinabuzachis
Copy link
Contributor

alinabuzachis commented Jan 28, 2022

Hi @andrew-pickin-epi, would you be willing to take time to work on this feature idea and open a PR instead?

cc @duderamos Are you still interested in working on this feature idea?

@marknet15
Copy link
Contributor

Hey all just to mention, I've picked this up and hope to have a PR prepared soon.

softwarefactory-project-zuul bot pushed a commit that referenced this issue Mar 28, 2022
Refactor s3_bucket_notifications to support SNS / SQS

SUMMARY
Refactor s3_bucket_notifications to extend module to support the extra targets of SNS and SQS along with the currently supported Lambda functions.
Summary of changes:

Refactor module to support SNS/SQS targets along with current Lambda function support.
Fix check mode coverage
Update integration tests to more comprehensive cover functionality.
Update documentation in sns_topic and sqs_queue modules to add policy setting example.

Fixes: #140
ISSUE TYPE

Feature Pull Request

COMPONENT NAME
s3_bucket_notifications
ADDITIONAL INFORMATION
https://boto3.amazonaws.com/v1/documentation/api/1.16.0/reference/services/s3.html#S3.Client.put_bucket_notification_configuration

Reviewed-by: Alina Buzachis <None>
Reviewed-by: Mark Woolley <mw@marknet15.com>
Reviewed-by: Markus Bergholz <git@osuv.de>
marknet15 added a commit to marknet15/community.aws that referenced this issue Mar 28, 2022
…tions#940)

Refactor s3_bucket_notifications to support SNS / SQS

SUMMARY
Refactor s3_bucket_notifications to extend module to support the extra targets of SNS and SQS along with the currently supported Lambda functions.
Summary of changes:

Refactor module to support SNS/SQS targets along with current Lambda function support.
Fix check mode coverage
Update integration tests to more comprehensive cover functionality.
Update documentation in sns_topic and sqs_queue modules to add policy setting example.

Fixes: ansible-collections#140
ISSUE TYPE

Feature Pull Request

COMPONENT NAME
s3_bucket_notifications
ADDITIONAL INFORMATION
https://boto3.amazonaws.com/v1/documentation/api/1.16.0/reference/services/s3.html#S3.Client.put_bucket_notification_configuration

Reviewed-by: Alina Buzachis <None>
Reviewed-by: Mark Woolley <mw@marknet15.com>
Reviewed-by: Markus Bergholz <git@osuv.de>
(cherry picked from commit dd89ed1)
marknet15 added a commit to marknet15/community.aws that referenced this issue Mar 29, 2022
…tions#940)

Refactor s3_bucket_notifications to support SNS / SQS

SUMMARY
Refactor s3_bucket_notifications to extend module to support the extra targets of SNS and SQS along with the currently supported Lambda functions.
Summary of changes:

Refactor module to support SNS/SQS targets along with current Lambda function support.
Fix check mode coverage
Update integration tests to more comprehensive cover functionality.
Update documentation in sns_topic and sqs_queue modules to add policy setting example.

Fixes: ansible-collections#140
ISSUE TYPE

Feature Pull Request

COMPONENT NAME
s3_bucket_notifications
ADDITIONAL INFORMATION
https://boto3.amazonaws.com/v1/documentation/api/1.16.0/reference/services/s3.html#S3.Client.put_bucket_notification_configuration

Reviewed-by: Alina Buzachis <None>
Reviewed-by: Mark Woolley <mw@marknet15.com>
Reviewed-by: Markus Bergholz <git@osuv.de>
marknet15 added a commit to marknet15/community.aws that referenced this issue Mar 29, 2022
…tions#940)

Refactor s3_bucket_notifications to support SNS / SQS

SUMMARY
Refactor s3_bucket_notifications to extend module to support the extra targets of SNS and SQS along with the currently supported Lambda functions.
Summary of changes:

Refactor module to support SNS/SQS targets along with current Lambda function support.
Fix check mode coverage
Update integration tests to more comprehensive cover functionality.
Update documentation in sns_topic and sqs_queue modules to add policy setting example.

Fixes: ansible-collections#140
ISSUE TYPE

Feature Pull Request

COMPONENT NAME
s3_bucket_notifications
ADDITIONAL INFORMATION
https://boto3.amazonaws.com/v1/documentation/api/1.16.0/reference/services/s3.html#S3.Client.put_bucket_notification_configuration

Reviewed-by: Alina Buzachis <None>
Reviewed-by: Mark Woolley <mw@marknet15.com>
Reviewed-by: Markus Bergholz <git@osuv.de>
alinabuzachis pushed a commit to alinabuzachis/community.aws that referenced this issue May 25, 2022
…tions#140)

* Support passing arbitrary extra keys to fail_json_aws

* changelog

* Disable python 3.9 unit tests - known issue with botocore/boto3

* Revert removal of Python 3.9 unit tests - fix should be upstream now
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects_2.10 feature This issue/PR relates to a feature request module module plugins plugin (any type) waiting_on_contributor Needs help. Feel free to engage to get things unblocked
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants