I have a Nuxt site hosted in Amplify which displays the following AccessDenied page for certain routes:
<Error>
<Code>AccessDenied</Code>
<Message>Access Denied</Message>
<RequestId>TCHGPECCM8WBEHSM</RequestId>
<HostId>fc9Jmfxb4sc+T/e8bT2wIQ/W5fT5Li868ydiaU04rQ54AQHLGkh+Nx4cLKufjBczDeLBLrvEJwo=</HostId>
</Error>
A route where this occurs is the following: https://ryanachten.com/projects/echo/, but doesn't occur on other pages such as https://ryanachten.com/projects/whosagoodboy/.
For pages where it does occur, accessing the page by the projects index seems to work https://ryanachten.com/projects but then subsequent refreshes of the page result in the same issue.
The Terraform for the Amplify setup can be found here. Of specific relevance is the Amplify app resource declared as follows:
resource "aws_amplify_app" "ryanachten" {
name = "ryanachten"
repository = "https://github.com/ryanachten/site"
access_token = var.github_access_token
build_spec = <<-EOT
version: 0.1
frontend:
phases:
preBuild:
commands:
- yarn install
build:
commands:
- yarn run generate
artifacts:
baseDirectory: dist
files:
- '**/*'
cache:
paths:
- node_modules/**/*
EOT
}
Anyone have any idea why this is occurring?
