I believe there’s no defined pricing for the Image CDN yet, it was mentioned in the blog article introducing it:
Thanks! Yes good to know there’s no explicit pricing yet, but I’m still keen to understand if imageCDN usage affects my function usage.
Anyway, I have disabled imageCDN in my astro config, just in case, so it now looks like this. I’ll see if the function usage seems lower from now on.
export default defineConfig({
integrations: [],
output: "hybrid",
adapter: netlify({
cacheOnDemandPages: true,
imageCDN: false,
}),
});
I didn’t have the edgeMiddleware
option enabled so I don’t think that’s responsible.
However, I do have two dynamic pages with:
export const prerender = false;
Astro.response.headers.set(
"CDN-Cache-Control",
"public, max-age=60, must-revalidate"
);
which could be the culprit, but I’m hoping means they’re only regenerated maximum once per hour, so if that’s working correctly I don’t think that can explain my high function usage either.
On Netlify’s function logs I just see very generic messages which don’t help me understand what the function is doing, unfortunately:
Feb 8, 01:07:04 PM: INIT_START Runtime Version: nodejs:18.v20 Runtime Version ARN: arn:aws:lambda:us-east-2::runtime:...
Feb 8, 01:07:05 PM: 063473fe Duration: 105.34 ms Memory Usage: 112 MB Init Duration: 833.18 ms
Feb 8, 01:07:06 PM: 4c92cc42 Duration: 716.38 ms Memory Usage: 156 MB
Feb 8, 01:07:07 PM: a9010d2f Duration: 477.88 ms Memory Usage: 164 MB
Feb 8, 01:07:11 PM: 0c4de7f6 Duration: 41.77 ms Memory Usage: 164 MB
Feb 8, 01:08:46 PM: 982595fa Duration: 107.69 ms Memory Usage: 164 MB
I’ve changed various things now, including updating the netlify adaptor to the latest version, so if things get better it will be a bit hard to know why unfortunately, with such opaque logs.