I created a static website using S3, CloudFront, Lambda@Edge.
CloudFront is he trigger for Lambda which will log visitor IP adress on a file in S3.
The lambda when tested separately using Function URL it works well and log the data correctly in the S3.
But once the lambda is associated to cloud front I get this message in the front.
Here is the website : www.parrainage-boursorama.net
503 ERROR
The request could not be satisfied.
The Lambda function associated with the CloudFront distribution is invalid or doesn’t have the required permissions. We can’t connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.
If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.
Generated by cloudfront (CloudFront)
Request ID: swnLdXaY3pciHdg_XnGuDyKRGuULXbPZ3xgCYNT-cxby5qiZh1cXpw==