title: Why Bref cannot load bootstrap: "Error: Couldn't find valid bootstrap(s): [/var/task/bootstrap /opt/bootstrap]"?
body: <p>I am investigating on how I can create an AWS lambda in php using the <a href="https://bref.sh/" rel="nofollow noreferrer">bref</a> library</p>
  
  <p>Therefore, according to <a href="https://bref.sh/docs/installation.html" rel="nofollow noreferrer">documentation</a> I set up the environment with the following command cocktail: </p>
  
  <pre><code>sudo -H npm install -g serverless
  composer require bref/bref
  </code></pre>
  
  <p>Then using the following command created my first php lambda:</p>
  
  <pre><code> vendor/bin/bref init
  </code></pre>
  
  <p>And I selected the first option <code>PHP Function</code> provided by default. Creating the following creating an <code>index.php</code> file:</p>
  
  <pre><code>declare(strict_types=1);
  
  require __DIR__.'/vendor/autoload.php';
  
  lambda(function ($event) {
      return 'Hello ' . ($event['name'] ?? 'world');
  });
  
  </code></pre>
  
  <p>Then I changed my <code>serverless.yml</code> into that:</p>
  
  <pre><code>service: app
  
  provider:
      name: aws
      region: eu-central-1
      runtime: provided
      stage: ${opt:stage,'local'}
  
  package:
      exclude:
          - '.gitignore'
  
  plugins:
      - ./vendor/bref/bref
  
  functions:
      dummy:
          handler: index.php
          name: Dummy-${self:provider.stage}
          description: 'Dummy Lambda'
          layers:
              - ${bref:layer.php-73}
  </code></pre>
  
  <p>And I try to launch it via the following command:</p>
  
  <pre><code>sls invoke local --stage=local --docker --function dummy
  </code></pre>
  
  <p>But I get the following error:</p>
  
  <pre><code>{"errorType":"exitError","errorMessage":"RequestId: 6403ebee-13b6-179f-78cb-41cb2f517460 Error: Couldn't find valid bootstrap(s): [/var/task/bootstrap /opt/bootstrap]"}
  
  </code></pre>
  
  <p>Therefore, I want to ask why I am unable to run my lambda localy?</p>