Particle-Cloud-Framework icon indicating copy to clipboard operation
Particle-Cloud-Framework copied to clipboard

SNS Particle

Open emr0327 opened this issue 6 years ago • 6 comments

Implemented the following functionalities for the SNS particle:

  • create a topic
  • set up a subscription to that topic
  • update the subscription attributes
  • delete the subscription
  • delete the topic

Acceptance Criteria:

  • [x] particle
  • [x] tests
  • [x] example

Resolves #65

emr0327 avatar Apr 27 '19 04:04 emr0327

@anovis look at my Slack message

emr0327 avatar May 08 '19 23:05 emr0327

@bb1314 @anovis Getting this error when running the example: botocore.errorfactory.InvalidParameterException: An error occurred (InvalidParameter) when calling the CreateTopic operation: Invalid parameter: Attributes Reason: Topic already exists with different attributes

maybe one of you can help

emr0327 avatar May 10 '19 21:05 emr0327

@emr0327 Do you know at which phase you're running into that error? Was it during _start() or _update()?

ethanwlo avatar May 14 '19 01:05 ethanwlo

@bb1314 it is happening in the _start() method when trying to update the particle with a different attribute. Seems as though on the apply() to update, get_current_definition() is returning ‘State.terminated’ so that is causing _start() to get called.

emr0327 avatar May 14 '19 02:05 emr0327

So... @emr0327 AWS just added tagging for SNS Topic. Before we close this PR, lets add the logic to handle tags as part of the particle. https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/sns.html#SNS.Client.create_topic

ethanwlo avatar May 17 '19 16:05 ethanwlo

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 3 committers have signed the CLA.

:white_check_mark: ethanwlo
:x: emr0327
:x: jacoblearned
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar Jul 21 '20 01:07 CLAassistant