Skip to content

preset aws-lambda cannot obtain the parameters #4107

@03127516family

Description

@03127516family

Environment

  • Node Version: v20.19.6

  • Nitro Version: v2.13.1

Reproduction

preset aws-lambda cannot obtain the parameters

Describe the bug

  1. Create a route server/home.ts to return event.path
  2. During the development stage, query is obtained normally
  3. preset : aws-lambda. npm run build
  4. Upload aws lambda.
  5. Access https:xxxxx/home? type=nitro
  6. event.path shows that /home is missing a query

Additional context

server/routes/home.ts

import { eventHandler } from "h3";

// Learn more: https://nitro.build/guide/routing
export default eventHandler((event) => {
  return `
      <meta charset="utf-8">
      <h1>This is your brand new Nitro project 🚀 </h1>
      Home event.path-- ${event.path}
    `;
});

nitro.config.ts

import { defineNitroConfig } from "nitropack/config";

// https://nitro.build/config
export default defineNitroConfig({
  compatibilityDate: "latest",
  srcDir: "server",
  imports: false,
  preset: "aws-lambda",
});

result

Image

Logs

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions