Does AWS S3 Charge for 403 requests? - amazon-web-services

In the Amazon S3 pricing list I saw that requests to the bucket costs money.
If I configure my bucket to be private, hence other users would get 403 in case of request to my bucket, would requests like this cost me money?
I've found AWS Forum: Charges for "403 Forbidden" and "404 Not Found" from more than a decade ago which explains the answer is yes, does anyone else knows if that's still the case?
It sounds very strange to me, especially considering there are many automatic tools that scan for buckets (and that's not even considering the case of intentional attack against specific bucket).
Thanks.

Related

Resource policies and cost on AWS API Gateway

I'm curious about using API Gateway resource policies to only allow a subset of IPs to access it. I am wondering, if someone outside of this IP range would spam the endpoint, would that still incur costs or do you only pay for "non-rejected" requests?
Thanks
would that still incur costs or do you only pay for "non-rejected" requests?
You do not pay for rejected requests. I have worked with the developers to confirm the code that triggers the charges executes only after the request gets past the access controls

Does AWS AWSDenyAll Policy Also Blocks Public Access to public files under s3 buckets?

Recently we discovered AWS Budgets and we added some budget controls for our account. We are using AWS mainly for file storage (s3) and we have quite a lot of files there.
Since AWS charges network fees for s3 file access, it occurred us that a person with malicious intent can do a ddos attack on our public files stored on s3 and cause a huge aws bill for us.
To avoid that, we created a budget with X USD upper limit and added the AWSDenyAll IAM Policy as the action for that budget. Our question is that, while it seems like it blocks the selected users to take al sort of actions on AWS services, does it also cut the public access for the s3 buckets we have, so that the costs stops at that point in case of an attack?
Thanks.

Why am I getting a 502 Bad Gateway error on my website after deleting cache Amazon S3 website

When I go to my website for the first time after deleting my cache I get a 502 Bad Gateway error.
The expression the first impression is the most important comes to mind with this. Why is this happening and how do I stop it.
I read up and I have found that it is a server-side issue, I am using Amazon AWS's S3 bucket.
Is there any advice?
www.alexthemaverick.co.uk

With Amazon S3, can I prevent trolls/grievers from making millions of GET-requests with bots?

I'm working on a website that contains photo galleries, and these images are stored on Amazon S3. Since Amazon charges like $0.01 per 10k GET-requests, it seems that a potential troll could seriously drive up my costs with a bot that makes millions of page requests per day.
Is there an easy way to protect myself from this?
The simplest strategy would be to create randomized URLs for your images.
You can serve these URLs with your page information. But they cannot be guessed by the bruteforcer and will usually lead to a 404.
so something like yoursite/images/long_random_string
Add aws Cloudfront service for your S3 object images. So it will retrieve the cached data from the edge location.
http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/MigrateS3ToCloudFront.html
As #mohan-shanmugam pointed out, you should use a CloudFront CDN with your origin as the S3 bucket. It is considered bad practice for external entities to hit S3 buckets directly.
http://docs.aws.amazon.com/AmazonS3/latest/dev/request-rate-perf-considerations.html
With a CloudFront distribution, you can alter your S3 bucket's security policy to only allow access from the distribution. This will block direct access to S3 even if the URLs are known.
In reality, you would likely suffer from website performance way before needing to worry about additional charges as a direct DDOS attempt against S3 should result in AWS throttling API requests.
In addition, you can set up AWS WAF in front of your CloudFront distribution and use it for advanced control of security related concerns.

Provide S3 bucket access to Any Authenticated AWS user in the new console

I am trying to provide full access for "Any Authenticated AWS User" to my S3 Bucket. The old S3 console has an option as below to do this:
The new console doesn't have a similar option any more. I am switching to the old console now to enable this option but the old console is going to be inaccessible soon by Aug 31st 2017. Any idea how can i do this in the new Console ? If not a UI option , at least with a bucket policy ?
I am trying to provide full access for "Any Authenticated AWS User" to my S3 Bucket.
I strongly advise against that. You are opening yourself up to an incredibly large number of potential issues.
What if somebody uploads 10PB of data to your bucket? Your bill would be at least $260k for that month.
What if somebody uploads copyrighted material (or any kind of illegal material) to your bucket? You would be responsible for the likely illegal distribution of copyrighted material.
Many, many companies are actively scanning their buckets to find those that have open write privileges and taking action to remediate that ASAP! Even some of the security related services from AWS will complain if you do that. As an example, Trusted Advisor has a built-in rule to detect and notify you against what you are trying to do.
If you describe the problem you are trying to solve, you might get betters suggestions.