I have created Lambda endpoints and subscribed to SNS, i created the SES and tested the message that saves in the dynamoDB through lambda, for the same SES when i send APNS_SANDBOX json format from lambda still it saves in dynamoDB, but i want to save the notifications from SNS Topic, when i send the notification from topic it do not save in the dynamoDB, i have given all the policies and permissions in IAM.
Please help me to solve this issue. can i have a complete details on saving the notifications in dynamoDB from SNS topic?
Related
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.
I have created an Amazon Lex bot. The user has to fulfill some slots. Now I want to send the response (all fulfilled slots) via email to a specific address. Is this possible with Amazon Lex bot or do I have to create a Lambda function?
Thank you for your hints
You need to use Lambda function or some other webhook where you will collect all the slots then trigger an email through your code or using some service like AWS SES.
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,
Is there a way to achieve twitter like push notification via AWS SNS?
SNS send notification to the user when something is happen him or her?
As i know the best way is to create a topic per user.
When user relate event happened,we publish a notification to the topic.
As AWS described the max topic number is 100,000 per account currently.
What if i've 1,000,000 users, it will not work.
Is there a more scalable scheme?
beeth0ven,
SNS supports publishing to a Topic of subscribed device endpoints or direct publishing to individual endpoints. In your case, you'll want to implement direct publishing to each individual endpoint. This allows more control and personal engagement but also means that you'll need to manage those endpoints in your own database and associate each endpoint to a user of your mobile app. Instead of publishing to a TopicArn, you'll publish individual messages to a TargetArn, which is the SNS Platform Endpoint that represents an app and mobile device. TargetArn is also the same call to send an SMS message to an individual phone number.
SNS Publish CLI: (see --target-arn)
http://docs.aws.amazon.com/cli/latest/reference/sns/publish.html
Direct Publishing via the Console:
http://docs.aws.amazon.com/sns/latest/dg/mobile-push-send-directmobile.html
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!