webiny-js icon indicating copy to clipboard operation
webiny-js copied to clipboard

Cloudfront distribution 404 after update

Open LeoDeJaneiro opened this issue 1 year ago • 1 comments

Version

5.39.6

Operating System

all

Browser

all

What are the steps to reproduce this bug?

  1. uploaded png / gif assets
  2. updated webiny (env prod) 5.38.2 -> 5.39.6 according update document
  3. trying to fetch any asset.

What is the expected behavior?

Assets should remain usable.

What do you see instead?

Assets are not found by Cloudfront: 404. The S3 bucket seems still filled, a random choice of assets shows that they are available there.

Additional information

I had a partly broken Webiny instance for some time due to the Node 16 Lambda runtime deprecation.

Possible solution

No response

LeoDeJaneiro avatar May 14 '24 14:05 LeoDeJaneiro

I traced the issue down to the lambda which cannot resolve the metadata file. I can confirm, that the *.metadata file does not exist for us for assets which have been uploaded with the 5.38.2 webiny version but for uploads with the updated version.

  1. Should this file exist for 5.38 uploads?
  2. How can we hotfix this? Is there any way to recreate them? Are these files AWS or Webiny specific?

from the Logstream:

45fadc43-31dd-4f35-bedb-25058de88219	INFO	Reading metadata 66263a76634da70008716c01/{filename}.png.metadata
2024-05-15T10:46:58.195Z	45fadc43-31dd-4f35-bedb-25058de88219	INFO	S3AssetResolver failed to read metadata: The specified key does not exist.

LeoDeJaneiro avatar May 15 '24 10:05 LeoDeJaneiro