Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid request provided when using "server-side-website" type #334

Open
kareemashraf opened this issue May 30, 2023 · 1 comment
Open
Labels
bug Something isn't working

Comments

@kareemashraf
Copy link

kareemashraf commented May 30, 2023

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

@kareemashraf kareemashraf added the bug Something isn't working label May 30, 2023
@mnapoli
Copy link
Member

mnapoli commented May 30, 2023

Hi, is this the same as #329?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants