Matt Stibbard
05/24/2021, 6:19 AM$ serverless deploy
Serverless: DOTENV: Loading environment variables from :
Serverless: Deprecation warning: CLI options definitions were upgraded with "type" property (which could be one of "string", "boolean", "multiple"). Below listed plugins do not predefine type for introduced options:
- ServerlessPlugin for "out"
- ServerlessOffline for "apiKey", "corsAllowHeaders", "corsAllowOrigin", "corsDisallowCredentials", "corsExposedHeaders", "disableCookieValidation", "enforceSecureCookies", "hideStackTraces", "host", "httpPort", "httpsProtocol", "lambdaPort", "noPrependStageInUrl", "noAuth", "ignoreJWTSignature", "noTimeout", "prefix", "printOutput", "resourceRoutes", "useChildProcesses", "useWorkerThreads", "websocketPort", "webSocketHardTimeout", "webSocketIdleTimeout", "useDocker", "layersDir", "dockerReadOnly", "functionCleanupIdleTimeSeconds", "allowCache"
Please report this issue in plugin issue tracker.
Starting with next major release, this will be communicated with a thrown error.
More Info: <https://www.serverless.com/framework/docs/deprecations/#CLI_OPTIONS_SCHEMA>
Serverless: Deprecation warning: Resolution of lambda version hashes was improved with better algorithm, which will be used in next major release.
Switch to it now by setting "provider.lambdaHashingVersion" to "20201221"
More Info: <https://www.serverless.com/framework/docs/deprecations/#LAMBDA_HASHING_VERSION_V2>
Serverless: Bundling with Webpack...
Starting type checking service...
Serverless: No external modules needed
Serverless: Packaging service...
Serverless: Uploading CloudFormation file to S3...
Serverless: Uploading artifacts...
Serverless: Uploading service hello.zip file to S3 (73.5 KB)...
Serverless: Validating template...
Serverless: Updating Stack...
Serverless: Checking Stack update progress...
.................
Serverless: Operation failed!
Serverless: View the full error output: <https://ap-southeast-2.console.aws.amazon.com/cloudformation/home?region=ap-southeast-2#/stack/detail?stackId=arn%3Aaws%3Acloudformation%3Aap-southeast-2%3A302062797280%3Astack%2Fnotes-ts-api-dev%2F08ea8a50-bc56-11eb-8a72-0a35287a3dce>
Serverless Error ----------------------------------------
An error occurred: HelloLambdaFunction - Resource handler returned message: "Uploaded file must be a non-empty zip (Service: Lambda, Status Code: 400, Request ID: bla, Extended Request ID: null)" (RequestToken: bla, HandlerErrorCode: InvalidRequest).
Get Support --------------------------------------------
Docs: <http://docs.serverless.com|docs.serverless.com>
Bugs: <http://github.com/serverless/serverless/issues|github.com/serverless/serverless/issues>
Issues: <http://forum.serverless.com|forum.serverless.com>
Your Environment Information ---------------------------
Operating System: win32
Node Version: 16.2.0
Framework Version: 2.43.0
Plugin Version: 5.1.3
SDK Version: 4.2.2
Components Version: 3.10.0
Matt Stibbard
05/24/2021, 6:36 AMhandler.js
generated and added to hello.zip
is 3,737 lines despite handler.ts
consisting of:
import { Context, APIGatewayEvent, APIGatewayProxyResult } from "aws-lambda";
export async function hello(
event: APIGatewayEvent,
context: Context
): Promise<APIGatewayProxyResult> {
return {
statusCode: 200,
body: JSON.stringify({
message: "Go Serverless v2.0! Your function executed successfully!",
context,
event,
}),
};
}
Frank