I’ve done local deployment some days ago. I’ve uploaded some pictures via file manager and everything looked fine until yesterday when I deployed cloud environment with
webiny deploy-api --env=dev and
webiny deploy-apps --env=dev using the same MongoDB database as local environment (value
api/.env.json is not changed). One picture is unable to load. On my side it looks like on the screenshot below.
Inspecting the page source I found that the picture’s url is available:
but the picture’s
srcset URL with “?width=2500” option on the end is not:
When I’m running this link I’m getting an error “The specified key does not exist.”
My webpage is accessible publicly. Scroll to the middle to see the broken picture: https://d2tyk63tl96wg.cloudfront.net/
I was trying to investigate what is wrong with the different resolutions of the picture. I found the cloudfront is connected to API Gateway, which is connected to Lambda. Lambda’s code is pretty long and generated by CoffeeScript which makes me feel I will spend many weeks understanding it. Also, CloudWatch logs related to the Lambda show no errors.
As I don’t really know how the Lambda works (and assume the problem can be here or in the database) can you tell me if this problem is fixable? Maybe using the same database for local and cloud deployment is a bad idea?