Invalid request provided when using "server-side-website" type
kareemashraf opened this issue · 1 comments
kareemashraf commented
Description
Hello, i have been following the Docs from Bref on using Lift
https://bref.sh/docs/frameworks/laravel.html#assets
and we are getting the following error on running "serverless deploy"
CREATE_FAILED: websiteRequestFunction9E9EBB7A (AWS::CloudFront::Function) Resource handler returned message: "Invalid request provided: AWS::CloudFront::Function: null (Service: CloudFront, Status Code: 409, Request ID: xxx-xxx-xxx-xx)" (RequestToken: xxx-xxx-xxx, HandlerErrorCode: InvalidRequest)
How to Reproduce
serverless.yml is
service: Test-Demo
provider:
name: aws
region: us-east-1
stage: dev
runtime: provided.al2
package:
patterns:
- '!node_modules/**'
- '!tests/**'
- '!README.md'
- '!.git/**'
- '!.idea/**'
functions:
web:
handler: public/index.php
timeout: 28 # in seconds (API Gateway has a timeout of 29 seconds)
layers:
- ${bref:layer.php-80-fpm}
events:
- httpApi: '*'
artisan:
handler: artisan
timeout: 120
layers:
- ${bref:layer.php-80} # PHP
- ${bref:layer.console} # The "console" layer
plugins:
- ./vendor/bref/bref
- serverless-lift
constructs:
website:
type: server-side-website
assets:
'/js/*': public/js
'/css/*': public/css
'/images/*': public/images
'/favicon.ico': public/favicon.ico
'/robots.txt': public/robots.txt
to reproduce the error just use 'serverless deploy'
Additional Information
keep in mind that the IAM user has ALL permissions