I have the following policy statement that would require the INTELLIGENT_TIERING
storage class key applied to bucket foo
:
{
"Sid": "EnforceIntelligentTiering",
"Effect": "Deny",
"Principal": "*",
"Action": "s3:PutObject",
"Resource": "arn:aws:s3:::foo/*",
"Condition": {
"StringNotEquals": {
"s3:x-amz-storage-class": "INTELLIGENT_TIERING"
}
}
}
If I try to copy a file up to this bucket that is less than the size threshold for the INTELLIGENT_TIERING
storage class (128 kB), will an error be thrown that prevents this file from being copied? Or will the standard tier be applied?
In the case of an error, how would I modify this policy so that it is only applied on files larger than the threshold, to avoid this error?
I applied your policy to one of my buckets, then uploaded a small file. It uploaded just fine:
However, the How S3 Intelligent-Tiering works - Amazon Simple Storage Service page says:
If the size of an object is less than 128 KB, it is not monitored and is not eligible for automatic tiering. Smaller objects are always stored in the Frequent Access tier.