EventBridge is not triggering SNS - aws-event-bridge

This is a simple task that when ever someone logs into aws console, a notification should be received on registered subscriber.
For this I have configured cloud trail, event bridge and SNS with subscribers.
Same configuration is working on another account but not on this account. Anyone have a solution for this? thanks
Event pattern
"source": ["aws.signin"],
"detail-type": ["AWS Console Sign In via CloudTrail"]

Related

How to connect Jira Webhook to Azure service bus

I am trying to connect the Jira webhooks to Azure Bus services to send my payload from Jira to Azure. When I tried using requestbin, I can able to receive the json payload from Jira webhook. But, when i tried with azure service bus URL in Jira , i am not receiving any messages. The Active message count is zero. Please help me in this case
Service Bus by itself will not push anything anywhere. You may try Service Bus Queue or Event Hub in combination with a Function App. The Function could be created with the trigger template for Queue or Event Hub. The Function could then call your WebHook or do any other things as per your requirement.
Relevant Links :
https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-service-bus-trigger?tabs=csharp
https://github.com/yokawasa/azure-functions-python-samples
Or, you can check the Azure Service Bus to Event Grid integration

How to programmatically delete confirmed SNS subscription (but not the topic) using Java SDK?

I'm writing an application that programmatically creates a new SQS queue that subscribes to an existing SNS topic and then deletes the SQS queue after.
I know there's a way to delete the SNS topic along with its subscriptions using Java SDK. I know I can manually delete the confirmed subscriptions from the web console. I know that pending subscriptions will expire on their own.
But I'd like to delete confirmed subscriptions programmatically but keep the SNS topic. Or will my confirmed subscription expire after some time after the SQS queue is gone?
To delete a subscriber to an Amazon SNS topic using the Java SDK, you should use the unsubscribe() command.
default UnsubscribeResponse unsubscribe(Consumer<UnsubscribeRequest.Builder> unsubscribeRequest)
throws InvalidParameterException,
InternalErrorException,
AuthorizationErrorException,
NotFoundException,
InvalidSecurityException,
AwsServiceException,
SdkClientException,
SnsException
Deletes a subscription. If the subscription requires authentication for deletion, only the owner of the subscription or the topic's owner can unsubscribe, and an AWS signature is required. If the Unsubscribe call does not require authentication and the requester is not the subscription owner, a final cancellation message is delivered to the endpoint, so that the endpoint owner can easily resubscribe to the topic if the Unsubscribe request was unintended.

AWS Cognito SMS delivery Issue with iOS

We are facing some technical issues with sms service in iOS AWS Cognito login. I signed up with my account details in AWS Cognito and I got below O/P,
Response body:
{"CodeDeliveryDetails":{"AttributeName":"phone_number","DeliveryMedium":"SMS","Destination":"+********8888"}}
But still am not received any sms from aws. This happened only today, but yesterday it works fine. Is there anything I have to set in my AWS account settings. Anybody knows what is the exact limit for sms. I refer some tutorials, and they ask me to request amazon customer service in order to extend the limit. Anyone have any idea about this? what is the correct procedure to handle this? If you know about anything, It would be helpful for me. Thank you!
Cognito Identity uses AWS SNS to dispatch SMS to your users. The pricing of the SMS dispatch can be found in AWS documentation.
You can monitor your SMS deliveries by subscribing to daily usage reports from Amazon SNS. Each day that you send at least one SMS message, Amazon SNS will deliver a usage report as a CSV file to an Amazon S3 bucket that you specify. You'll find details on the setup in AWS documentation.
If you can't find relevant hints to solve your issue in those reports, you should contact AWS support directly from your AWS console.
Regards,

Getting all event of a Bot(user) via Webhook

I have read about the outbound webhook and Event api. And i am able to install a bot to a team using slack button. outbound webhook dosent fit in my scenario i think.
So how can i can get all events(specially whenever this bot receive a msg) using the event api to my webhook.?
Any direction or right way to solve this problem ..?
Outgoing Webhook and Event API are two completely unrelated functions. So you can not get event notifications through an outgoing webhook.
To get event notification your Slack App need to
request the correct oath scopes
subscribe to the events you want to get in the Slack App config
have a script ready to receive the event requests from Slack
Your script will then be called every time the subscribed event occurs.
For all details please have a look at the excellent official documentation about the Event API.

Amazon SNS Mobile Push - how to bulk subscribe endpoints to a topic?

I am trying to move my existing iOS push notification infrastructure over to amazon SNS mobile push.
I exported all my tokens from my local db into an SNS application (using CSV). Now I want to send push notification to all my 10,000 users. I think the only way is to create a topic and subscribe all the users to that topic then publish message to that topic.
Is there any easy way to subscribe all the 10,000 users who I have imported into the system to a topic?
Thanks for any help!
It sounds like you have created the Amazon SNS Platform Application and imported your tokens as Amazon SNS Platform Endpoints.
What kind of notification are you sending?
If you send a custom message to each user, use Direct
Addressing. With this approach, you
Publish to each EndpointARN.
If you send the same message to all users, use topics. You need to subscribe your endpoints to a topic. When you are ready to send, Publish to the TopicARN. Amazon SNS will handle delivery to all endpoints subscribed to that topic. Amazon SNS currently does not provide a bulk subscribe API, so you will have to invoke Subscribe once per EndpointARN.
Full disclosure: I work for AWS on Amazon SNS.
Unfortunately there is no way so far... see Bulk push endpoints subscription to a topic on AWS Discussion Forum.
Hi there langelvicente,
Thanks for this feature request. I've passed this back through to the SNS Service Team for review.
Best regards,
Phil P
This is now possible with subscribing mobile endpoints to topics. The default subscriber limit was increased.
Q: Are there limits to the number of topics or number of subscribers
per topic?
By default, SNS offers 10 million subscriptions per topic, and 3,000
topics per account. To request a higher limit, please contact us at
at http://aws.amazon.com/support
http://aws.amazon.com/sns/faqs/?nc2=h_ls
If you have an application full of endpoints which you want to bulk subscribe to a SNS topic you can do so from the AWS SNS dashboard by:
Going to that application in SNS
Waiting until the 'total items' count at the bottom has completed its count (ie all items are listed)
Checking the select all check mark above the list of endpoints (screenshot attached)
Tap on platform action > subscribe endpoints to topic
Enter your topic ARN and click create subscription
The process will begin and it will stall your web browser but let it be as it takes time and if you want to see the subscriptions to the topic increasing you can use the AWS CLI with :
aws sns get-topic-attributes --topic-arn "[YOUR TOPIC ARN]"
note the "SubscriptionsConfirmed" value
Yes, but caveat: they each must accept your effort to enroll them into push messaging. That means that for each token in your database, each individual must consent to receiving future messages from you (via SMS and email, that is).
Each address (tel #, email) becomes an endpoint, and you can use SNS to create a topic, then subscribe each endpoint. After a confirmation email is sent to each endpoint (person on your list), they must confirm, in order to begin receiving your stream of messages via text or email.
Unfortunately, this confirmation/consent event is dicey, and must be handled correctly. Your ARN's title must be succinct (7 letter via SMS, no subject line allowed). Hence, you must contact them via SMS using a name they will recognize (the SMS message will arrive via short code, 304-something), and can be refused and/or blocked.
Not trivial! Best to investigate using push messages via mobile app. This will avoid the coveted SMS space, but you might consider putting out a blast to email and/or SMS, in order to get them using your mobile app. Apparently, given the immediacy of SMS, folks will be reading your first confirmation within 20 seconds. This could be a good thing, if they confirm, then accept your future messages.
Am doing this right now, and am preparing to be recognized by name using my initial blast -- apps that create anonymous SMS will be banned through iTunes!

Resources