Skip to content
This repository was archived by the owner on Jan 28, 2025. It is now read-only.
This repository was archived by the owner on Jan 28, 2025. It is now read-only.

Component: 503 CloudFront error #146

@josephluck

Description

@josephluck

Hey!

I've converted my Next.js application to use the new serverless component, but I'm stuck at what seems like a configuration or permissions issue with CloudFront and the lambdas.

After deploying the app (successfully) to a custom domain, CloudFront returns the following error:

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.

Here's my serverless configuration:

name: internote-ui

app:
  component: serverless-next.js
  inputs:
    domain: ["dev", "internote.app"]

The next build runs correctly and I can run the application locally fine (in production built / serverless mode with next build).


From digging around I suspect that this is a IAM issue, yet I can see that there's a IAM policy between CloudFront and the edge Lambda that looks correct to me (from my admittedly limited knowledge of IAM!). I wondered if anyone else has experienced this and can offer any advice?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions