AWS billing shows SNS usage without any topics? - amazon-web-services

I was going through my AWS Billing Dashboard and noticed, that I am using some of my monthly free tier SNS requests. However, I don't uses SNS in any of my projects. I checked the SNS console and Topics, Subscriptions and Platform applications all show 0.
I am mostly using eu-west-1 region, but billing shows usage of both 1,000,000 Requests for Amazon Simple Notification Service (EU) and (USE1). The only thing I have in us-east-1 is a lambda that uses a "Alexa Home Skill" as a trigger (and doesn't use SNS afaik). The billing shows 4 used request this month, but the skill is used much more than that, so I don't think that's the culprit.
I have only a bunch of lambdas, triggered with CloudWatch events, Alexa skills or API Gateway. Any idea why would SNS show up?

Related

How to get forecasted AWS alerts/outages in email?

2 weeks back, I saw a notification in AWS saying, the one of the 3 AWS EC2 instance will be stopped because of the underlying hardware cause. I almost missed the dead line as I didn't the notification via email. Is there a way get these notification via email?
It would be much better if I can get the notifications using cloud watch to my email.
If you're on Business or Enterprise Support, AWS provides a solution named "AWS Health Aware" built on top of AWS Health API, it does exactly what you're after sends you notifications via several methods including emails regarding outages and planning maintenance that affect your account(s).
If you're on a Basic support plan you can easily built something similar yourself using based on [AWS Health events][2]
This is an example of capturing AWS Health events via EventBridge so they can be further send to a lambda or SNS
https://docs.aws.amazon.com/health/latest/ug/cloudwatch-events-health.html
What I've done in the is following:
Capturing AWS Health events via EventBridge in spoke accounts and forward them to the event bus in my hub account
In the hub account I would subscribe a lambda function for all events with source "aws.health" and then send email or slack message whatever works for you.
I think Amazon EventBridge is what you are looking for. With EventBridge you can detect and react to different events such as EC2 instances scheduled for updates. You can, for example, create a rule for detecting a specific health event and in the target section choose to receive an email through SNS or invoke a CloudWatch log group, etc. Read more here.

what is the difference among amazon inspector vs trusted advisor vs cloudwatch vs Personal Health Dashboard vs AWS cloudtrail?

Hi dear StackOverflow community,
These below amazon concepts are confusing to me, I do not get to establish the key difference among them at once:
Amazon inspector vs trusted advisor vs cloudwatch vs Personal Health Dashboard vs AWS cloud trail.
Could you help me to get clarity in the key difference among them?
Thank you very much in advance
Trusted Advisor
Trusted Advisor offers recommendations to lower cost and improve security, performance and fault tolerance. Some are provided for free, while all of the recommendations are only available to subscribers to AWS Support.
Personal Health Dashboard
AWS Personal Health Dashboard shows issues and outages that might affect your usage of AWS services.
Amazon CloudWatch
Amazon CloudWatch stores metrics and allows Alarms to be configured based on those metrics. Many AWS services send metrics to CloudWatch, such as Amazon EC2 providing CPU metrics and Amazon S3 providing storage metrics. It also has CloudWatch Logs that can store log files and respond to log messages, and CloudWatch Events that can trigger actions in response to certain events).
AWS CloudTrail
AWS CloudTrail is an audit trail of API calls made to AWS. It tracks details of all requests, such as the user, source IP, timestamp, request parameters and the success of the API call. Just like a security company keeps track of every time you use a swipe-card, CloudTrail keep track of every time a request is made to an AWS service.
Amazon Inspector
Amazon Inspector runs on Amazon EC2 instances and scans the computer for known vulnerabilities in the operating system and applications.

Amazon Pinpoint API vs AWS Simple Notification Services

For the purpose of sending push notifications from the backend, if we need a Push Notification Platform, could you please suggest which of these is intended for that purpose – Amazon SNS or Pinpoint?
Both Amazon SNS and Amazon Pinpoint, supports sending push notification to various devices (e.g Android, iOS etc)
The major difference between Amazon SNS & Amazon Pinpoint is that :
with Amazon SNS you have to set up your application to manage each message's audience, content, and delivery schedule. On the other hand, with Amazon Pinpoint you do not have to code these features, most of them are already built in. With Amazon Pinpoint, you can collect data about your app usage, create highly-targeted segments and send full campaigns(either immediate or scheduled) plus many more features.

How to debug issues with Amazon SQS subscription to SNS

I want to build a pub/sub messaging system into my services that are hosted on Amazon Web Services, and creating SQS queues that subscribe to SNS topics seems like the obvious direction to take, but I can't get it working at all.
So far my code looks for the topics and the queues at startup and creates anything that's missing. This seems to work, I can see the SNS topic and the SQS queues in the AWS management console, and I can see that the queue is subscribed to the topic, but when I publish messages to the topic nothing ends up in the queue.
Even if I manually publish a message using the 'Publish' button in the management console the queue is still empty.
I changed the permissions on both the topic and the queue to 'everyone can do everything' just to eliminate this possibility. My code receives a message ID in response to the publish and there are no errors, every API call returns a 200 (OK) status.
Where can I go from here to figure out why it's not working?
The SNS --> SQS link has a few gotchas:
"Amazon SNS isn't currently compatible with FIFO queues." per the note on their Subscribing an Amazon SQS Queue to an Amazon SNS Topic Tutorial
You have to fiddle with the IAM permissions (see the page on Sending Amazon SNS Messages to Amazon SQS Queues)
You can't send messages to encrypted queues (see their Server-Side Encryption page)
It would definitely have been easier to figure this out if all this info were consolidated into a single page. The killer for me was #3 - perhaps one of these will be the solution to your issue.
A couple of options -
Enable CloudTrail and monitor the logs
View the CloudWatch logs to identify any permissions issues
Open a ticket with AWS support.
Ideally, you wouldn't be creating the resources in your application but instead decouple those into CloudFormation or at a minimum CLI scripts. If you require the ability to dynamically create these resources, using the AWS IoT Message Broker may be a better option since it supports ephemeral messaging resources - http://docs.aws.amazon.com/iot/latest/developerguide/iot-message-broker.html
I had a similar issue with SQS subscriptions. It turned out that if I create the subscription from the SQS editor it works, but if I create it from the SNS creation screen it accepts the message but never forwards it to the queue.
To get more detailed information about specific failures you can turn on
SNS "Delivery status logging".

Create SNS Topic As Cognito Identity

Playing around with AWS in Golang.
At the moment I use the AWS SDK front-end with Facebook as a Credentials Provider to create Identities in AWS Cognito. This works great.
I use SNS to send Push Notifications to iOS and Android, this also works great.
But I read that SNS only allows 3000 topics per User. If I understand how Cognito and SNS work (and with what I see in logs/dashboard) All Topics are created by the Role that the Cognito Identities assume. So they are all created by the same "User". So I will hit 3000 very quickly with the service in mind.
Ideally I would send AWS Credentials to my Golang back-end and there I would create Topics per Identity and confirm subscriptions.
Is it possible to create Topics per Cognito Identity, make the individual Identities the Owner of the Topic?
If so, is this a specific API call?
Or is this something that has to be set with a specific Role?
AWS doesn't typically limit things by "user" like that. The 3,000 SNS topics limit is per AWS account. This is a soft limit. You can fill out a request to have the limit raised.
Also, I'm not sure 3,000 is the default limit anymore. I can't seem to find that in any of the official documentation at this time. This is the only thing I can find, which lists a limit of 100,000 SNS topics: http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_sns