CloudWatch Events rule Limits - amazon-web-services

what is the maximum number of rules for cloud watch I can create on my AWS account. I might have a lot of different rules that will invoke lambda function on schedule. Is it unlimited?

The basic limits are documented at http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/cloudwatch_limits.html - currently 50 rules per account.
If you need more, reach out through your AWS contact and these can be expanded.

This is no longer 50 and has been increased to 100 per region per account.
As per this link:
https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/cloudwatch_limits_cwe.html
And as mentioned by johnny: this can be increased further on request (if amazon approves the request).

After talking to AWS cloud watch team I found out that the rule limit can be increased as per your need.

If you're willing to use a non-AWS service, then you might check out Microsoft Azure. Azure offers a great job scheduler that doesn't pose any limits. You could use this service to invoke your lambda functions.

Related

How to monitor AWS Billing Credits?

Because of business needs, I now need to monitor the service deduction amount of AWS. When the service deduction amount is less than $5000, I will give an alarm to relevant management personnel. Is there a way to realize this? I checked the documentation of AWS cost Explorer API on the official website, but I didn't see the API related to the service deduction amount.
Personally, I recommend AWS cloud watch and Grafana dashboard.
https://grafana.com/grafana/dashboards/139
You can use AWS Budgets to create an alert where your credits are at a certain threshold. You can use the advance filters to alert only on credits
You can also check https://aws.amazon.com/blogs/startups/how-to-set-aws-budget-when-paying-with-aws-credits/

Filtering the detailed bill generated by AWS account according to Region in aws

I am working on a project and all the project resource is on 'me-south-1'
I have other resources things in other regions.
I need to send a detailed bill to the client.
could anyone suggest me,How can I filter it according to the region?
For detailed billing (with the ability to filter) the best approach is to use Cost Explorer.
By using this service you can apply a range of filters (including region), this can also be done programmatically.
Be aware that using this service does charge $0.01 per request.

AWS Codepipeline limitations on a single account

We are planning to leverage AWS codepipeline by hosting it on a single AWS account, moving forward pipeline count will get around ~500, Is there any limitation by AWS that only certain number of pipelines needs to be hosted on a single account.
Do we need to have a separate account for hosting all these pipelines or just host these on the AWS account in which the application is running? what are the best practices?
You can see the limits pertaining to CodePipeline at https://docs.aws.amazon.com/codepipeline/latest/userguide/limits.html.
It looks like as of now there is a soft limit is 300 pipelines per region per account. If you hit that number, you should be able to request an increase by following the link in that document.
As mentioned in another answer, the default limit for pipelines per account per region is 300. This limit can be raised on request.
While you can run more than 300 pipelines per account, you may also start running into related limits like IAM roles per account, CloudWatch Event rules per account, etc. You can get these limits raised too, but the complexity of dealing with all this can start to add up.
My personal recommendation would be to split things across multiple accounts so that there are about 300 pipelines per account at most. If you have multiple teams or multiple departments, splitting accounts by team/department can be a good idea anyway.

AWS Glue request limit

Have some lambdas that request schemas form AWS Glue. Would like to know if there is a limit of requests to AWS Glue after which Glue cannot handle it? Load testing in other words.
Have not found anything about it in official documentation.
Thanks
The various default, per-region limits for the AWS Glue service are listed at the below link. You can request increases to these limits via the support console.
https://docs.aws.amazon.com/glue/latest/dg/troubleshooting-service-limits.html
These limits are not a guaranteed capacity unless there is an SLA defined for the service, which I don't think Glue has. One would assume that EC2 is the backing service though so capacity should theoretically not be an issue. You will only know by running your workflow over a long period of time to see the true availability of the service if there is no SLA.
have a look here:
https://docs.aws.amazon.com/general/latest/gr/glue.html
as of today (2020/01/27):
Number of jobs per trigger 50

Using AWS budgets to stop a services

I am currently signed up to the free tier of AWS. I am enjoying experimenting with various services including those not affording by said free tier. Can AWS's enhanced budgets be used to stop services like EC2 instances if I accidentally spend too much? Or do they merely act as alerts?
This is available for EC2, I don't think it is available for all of the AWS resources.
http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/UsingAlarmActions.html
Hope it helps.
There are several posts which looks it from different perspectives, such as this and this.
Having a cost cap might be a crucial requirement based on the usage, especially when considering how complex it is to set the things up properly and keeping everything secure on the cloud for an average user. At least we can expect to have a feature to switch on/off a cost-cap service, so a user can decide their own scenario easily.
Closest solution that I found is here:
Serverless Automated Cost Controls
https://aws.amazon.com/blogs/compute/serverless-automated-cost-controls-part1
It explains how to trigger AWS Lambda function to change IAM permission from EC2FullAccess to EC2ReadOnly when the budget exceeds the limit.
There is no built-in way to terminate services based on budgets or billing alarms.
You can get notified automatically, but it is then up to you to determine how to handle it.
Would you really want AWS automatically terminating your production infrastructure because you went $1 over your estimated monthly spending?
Edit: There is now a way to monitor and alert on free tier usage, and when your predicted usage will exceed the free tier. See here for details. You could probably come up with a way to terminate infrastructure based on an alert using SNS & lambda.
Edit 2: In Oct. 2020, AWS released Budget Actions - the ability to trigger an action when a budget thresholds are reached. This should give you the ability to automate a response - you can shut down servers, change IAM permissions to prevent additional infrastructure from being created, etc.
Recently, Amazon has given "budget action" to carry out actions like stop services automatically if the budget has exceeded.
https://aws.amazon.com/about-aws/whats-new/2020/10/announcing-aws-budgets-actions/
https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/budgets-controls.html#:~:text=select%20Configure%20thresholds.-,To%20configure%20a%20budget%20action,-Under%20Configure%20thresholds