serverless / dashboard-plugin

The Serverless Framework Dashboard plugin
https://www.serverless.com/dashboard/
MIT License
49 stars 31 forks source link

Function Deployment fails when using architecture: arm64 #699

Open otekdo opened 1 year ago

otekdo commented 1 year ago

Are you certain it's a bug?

Is the issue caused by a plugin?

Are you using the latest v3 release?

Is there an existing issue for this?

Issue description

When i'm trying to deploy a simple lambda function with API gateway endpoint, deployments works nicely when using the default architecture x86

The error happens when i switch to architecture: arm64

----In case it helps, these are the files

This is my index.js file

const serverless = require("serverless-http");
const Koa = require("koa");
const Router = require("koa-router");

const app = new Koa();
const router = new Router();

router.get("/", (ctx) => {
  ctx.body = {
    message: "Hello world",
  };
});

app.use(router.routes());

module.exports.handler = serverless(app);

This is my package.json file

{
  "name": "my-serverless-api",
  "version": "1.0.0",
  "description": "My Serverless api",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "dependencies": {
    "koa": "^2.13.4",
    "koa-router": "^12.0.0",
    "serverless-http": "^3.1.0"
  },
  "devDependencies": {
    "standard": "^17.0.0"
  }
}

Service configuration (serverless.yml) content

org: "NOT REDACTED"
app: my-serverless-app
service: my-serverless-service

provider:
  name: aws
  runtime: nodejs18.x
  architecture: arm64
  memorySize: 512
  stage: prod
  stackName: my-serverless-stack
  region: us-east-1

functions:
  myKoaEndpoint:
    handler: index.handler
    events:
      - httpApi: "*"

Command name and used flags

serverless deploy

Command output

Error:
Error: Application not found. - Please contact support and provide this identifier to reference this issue - QYMQ7F0S4YM6
    at Object.request (C:\Users\NARUTO\AppData\Roaming\nvm\v16.15.1\node_modules\serverless\node_modules\@serverless\platform-client\src\utils.js:64:19)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async module.exports (C:\Users\NARUTO\AppData\Roaming\nvm\v16.15.1\node_modules\serverless\node_modules\@serverless\dashboard-plugin\lib\app-uids.js:7:15)
    at async ServerlessEnterprisePlugin.<anonymous> (C:\Users\NARUTO\AppData\Roaming\nvm\v16.15.1\node_modules\serverless\node_modules\@serverless\dashboard-plugin\lib\plugin.js:250:13)
    at async PluginManager.runHooks (C:\Users\NARUTO\AppData\Roaming\nvm\v16.15.1\node_modules\serverless\lib\classes\plugin-manager.js:530:9)
    at async PluginManager.invoke (C:\Users\NARUTO\AppData\Roaming\nvm\v16.15.1\node_modules\serverless\lib\classes\plugin-manager.js:563:9)
    at async PluginManager.spawn (C:\Users\NARUTO\AppData\Roaming\nvm\v16.15.1\node_modules\serverless\lib\classes\plugin-manager.js:585:5)
    at async before:deploy:deploy (C:\Users\NARUTO\AppData\Roaming\nvm\v16.15.1\node_modules\serverless\lib\plugins\deploy.js:40:11)
    at async PluginManager.runHooks (C:\Users\NARUTO\AppData\Roaming\nvm\v16.15.1\node_modules\serverless\lib\classes\plugin-manager.js:530:9)
    at async PluginManager.invoke (C:\Users\NARUTO\AppData\Roaming\nvm\v16.15.1\node_modules\serverless\lib\classes\plugin-manager.js:563:9)
    at async PluginManager.run (C:\Users\NARUTO\AppData\Roaming\nvm\v16.15.1\node_modules\serverless\lib\classes\plugin-manager.js:604:7)
    at async Serverless.run (C:\Users\NARUTO\AppData\Roaming\nvm\v16.15.1\node_modules\serverless\lib\serverless.js:170:5)
    at async C:\Users\NARUTO\AppData\Roaming\nvm\v16.15.1\node_modules\serverless\scripts\serverless.js:787:9

Environment information

Framework Core: 3.25.1
Plugin: 6.2.2
SDK: 4.3.2
otekdo commented 1 year ago

Based on AWS docs, it seems that NodeJS 18.x versions has support for arm64 architectures https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html image

medikoo commented 1 year ago

@otekdo it might be that arm64 is not supported by Dashboard. Can you report it to Dashboard support?

otekdo commented 1 year ago

When talking about dashboard, do you mean this platform? https://app.serverless.com

Update: I will report it here https://github.com/serverless/dashboard-plugin

medikoo commented 1 year ago

When talking about dashboard, do you mean this platform? https://app.serverless.com

Yes

I will report it here https://github.com/serverless/dashboard-plugin

No, need, let my just move this issue there