You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am setting up aws codepipeline and need to fire putJobSuccessFresult so pipeline can finish the deployment task.
Currently I can't call this event so it hangs and times out eventually. Here is the error message I am getting. From my understanding I won't be able to push my code using codepipeline?
"errorType": "Bref\Event\InvalidLambdaEvent",
"errorMessage": "This handler expected to be invoked with a API Gateway or ALB event. Instead, the handler was invoked with invalid event data: Array\n(\n [CodePipeline.job] => Array\n (\n
"#0 /var/task/vendor/bref/bref/src/Event/Http/HttpHandler.php(23): Bref\Event\Http\HttpRequestEvent->__construct()",
"#1 /var/task/vendor/bref/bref/src/Runtime/Invoker.php(29): Bref\Event\Http\HttpHandler->handle()",
"#2 /var/task/vendor/bref/bref/src/Runtime/LambdaRuntime.php(91): Bref\Runtime\Invoker->invoke()",
"#3 /opt/bootstrap(43): Bref\Runtime\LambdaRuntime->processNextEvent()",
"#4 {main}`
=========serverless.yml=========
service: app
provider:
name: aws
region: us-west-2
plugins:
- ./vendor/bref/bref
functions:
api:
handler: public/index.php
description: ''
runtime: php-83-fpm
timeout: 28 # in seconds (API Gateway has a timeout of 29 seconds)
events:
- httpApi: '*'
Exclude files from deployment
package:
patterns:
- '!node_modules/'
- '!tests/'
=========index.php=========
addRoutingMiddleware();
/**
* Add Error Middleware
*
* @param bool $displayErrorDetails -> Should be set to false in production
* @param bool $logErrors -> Parameter is passed to the default ErrorHandler
* @param bool $logErrorDetails -> Display error details in error log
* @param LoggerInterface|null $logger -> Optional PSR-3 Logger
*
* Note: This middleware should be added last. It will not handle any exceptions/errors
* for middleware added after it.
*/
$errorMiddleware = $app->addErrorMiddleware(true, true, true);
// Define app routes
$app->get('/', function (Request $request, Response $response, $args) {
$response->getBody()->write("Welcome to the location serverless app!");
return $response;
});
$app->get('/phpinfo', function (Request $request, Response $response, $args) {
phpinfo();
});
return function ($event) {
return 'Hello ' . ($event['name'] ?? 'world');
};
// Run app
$app->run();
The text was updated successfully, but these errors were encountered:
I am setting up aws codepipeline and need to fire putJobSuccessFresult so pipeline can finish the deployment task.
Currently I can't call this event so it hangs and times out eventually. Here is the error message I am getting. From my understanding I won't be able to push my code using codepipeline?
"errorType": "Bref\Event\InvalidLambdaEvent",
"errorMessage": "This handler expected to be invoked with a API Gateway or ALB event. Instead, the handler was invoked with invalid event data: Array\n(\n [CodePipeline.job] => Array\n (\n
"#0 /var/task/vendor/bref/bref/src/Event/Http/HttpHandler.php(23): Bref\Event\Http\HttpRequestEvent->__construct()",
"#1 /var/task/vendor/bref/bref/src/Runtime/Invoker.php(29): Bref\Event\Http\HttpHandler->handle()",
"#2 /var/task/vendor/bref/bref/src/Runtime/LambdaRuntime.php(91): Bref\Runtime\Invoker->invoke()",
"#3 /opt/bootstrap(43): Bref\Runtime\LambdaRuntime->processNextEvent()",
"#4 {main}`
=========serverless.yml=========
service: app
provider:
name: aws
region: us-west-2
plugins:
- ./vendor/bref/bref
functions:
api:
handler: public/index.php
description: ''
runtime: php-83-fpm
timeout: 28 # in seconds (API Gateway has a timeout of 29 seconds)
events:
- httpApi: '*'
Exclude files from deployment
package:
patterns:
- '!node_modules/'
- '!tests/'
=========index.php=========
addRoutingMiddleware(); /** * Add Error Middleware * * @param bool $displayErrorDetails -> Should be set to false in production * @param bool $logErrors -> Parameter is passed to the default ErrorHandler * @param bool $logErrorDetails -> Display error details in error log * @param LoggerInterface|null $logger -> Optional PSR-3 Logger * * Note: This middleware should be added last. It will not handle any exceptions/errors * for middleware added after it. */ $errorMiddleware = $app->addErrorMiddleware(true, true, true); // Define app routes $app->get('/', function (Request $request, Response $response, $args) { $response->getBody()->write("Welcome to the location serverless app!"); return $response; }); $app->get('/phpinfo', function (Request $request, Response $response, $args) { phpinfo(); }); return function ($event) { return 'Hello ' . ($event['name'] ?? 'world'); }; // Run app $app->run();The text was updated successfully, but these errors were encountered: