Hi Aswin,
Yes this sounds like expected behaviour especially in cloudier areas of the world, some weeks you will not receive an Sentinel-2 image that is not cloudy. You can request all the observations without a maximum cloud coverage but as you said you then wish to flag the images that are “cloudy”.
One approach to doing this would be to use Catalog API. For the Sentinel-2 L2A data collection, there is a property named eo:cloud_cover
that returns the cloud percentage. You could use this property as a way to flag the images that are too cloudy to use.
You can also do this in your evalscript with the following:
function updateOutputMetadata(scenes, inputMetadata, outputMetadata) {
outputMetadata.userData = { "tiles": scenes.tiles }
}
This will return something like this:
{"tiles":[{"date":"2018-12-27T10:08:07Z","shId":563038,"cloudCoverage":54.68,"tileOriginalId":"S2B_OPER_MSI_L2A_TL_MPS__20181227T125927_A009443_T33TUL_N02.11","__idx":0,"dataPath":"s3://sentinel-s2-l2a/tiles/33/T/UL/2018/12/27/0"},{"date":"2018-12-27T10:08:03Z","shId":562930,"cloudCoverage":33.68,"tileOriginalId":"S2B_OPER_MSI_L2A_TL_MPS__20181227T125927_A009443_T33TVL_N02.11","__idx":1,"dataPath":"s3://sentinel-s2-l2a/tiles/33/T/VL/2018/12/27/0"},{"date":"2018-12-27T10:07:52Z","shId":562880,"cloudCoverage":7.81,"tileOriginalId":"S2B_OPER_MSI_L2A_TL_MPS__20181227T125927_A009443_T33TUM_N02.11","__idx":2,"dataPath":"s3://sentinel-s2-l2a/tiles/33/T/UM/2018/12/27/0"},{"date":"2018-12-27T10:07:48Z","shId":562939,"cloudCoverage":0.07,"tileOriginalId":"S2B_OPER_MSI_L2A_TL_MPS__20181227T125927_A009443_T33TVM_N02.11","__idx":3,"dataPath":"s3://sentinel-s2-l2a/tiles/33/T/VM/2018/12/27/0"}]`
From this you can get the cloud coverage percentage and choose a percentage to flag the acquisitions that you are interested in.
If there is more I can clarify, let us know!