Skip to content

[BUG] Deployment expects layer in the wrong region #2

Description

@itsyoboieltr

My layer is in eu-central-1.

elysia-lambda.yaml

deploy: src/index.ts
name: elysia-lambda
region: eu-central-1
memory: "1024"
arch: x86_64
description: Elysia Lambda
role: arn:aws:iam::...
layers:
  - arn:aws:lambda:eu-central-1:...

I set the configuration to be the same region as the bun layer.

bun run deploy

$ elysia-lambda --config elysia-lambda.yaml

Deploying "elysia-lambda"!
/Users/.../node_modules/@aws-sdk/client-lambda/dist-cjs/protocols/Aws_restJson1.js:5222
    const exception = new models_0_1.InvalidParameterValueException({
                      ^

InvalidParameterValueException: Layers are not in the same region as the function. Layers are expected to be in region us-east-1.
    at de_InvalidParameterValueExceptionRes (/Users/.../node_modules/@aws-sdk/client-lambda/dist-cjs/protocols/Aws_restJson1.js:5222:23)
    at de_CreateFunctionCommandError (/Users/.../node_modules/@aws-sdk/client-lambda/dist-cjs/protocols/Aws_restJson1.js:1931:25)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async /Users/.../node_modules/@smithy/middleware-serde/dist-cjs/deserializerMiddleware.js:7:24
    at async /Users/.../node_modules/@aws-sdk/middleware-signing/dist-cjs/awsAuthMiddleware.js:14:20
    at async /Users/.../node_modules/@smithy/middleware-retry/dist-cjs/retryMiddleware.js:27:46
    at async /Users/.../node_modules/@aws-sdk/middleware-logger/dist-cjs/loggerMiddleware.js:7:26
    at async deploy (file:///Users/.../node_modules/elysia-lambda/deploy.mjs:302:9)
    at async file:///Users/.../node_modules/elysia-lambda/deploy.mjs:376:21 {
  '$fault': 'client',
  '$metadata': {
    httpStatusCode: 400,
    requestId: '253db0b8-3066-4ed2-aa4f-8c43b512a739',
    extendedRequestId: undefined,
    cfId: undefined,
    attempts: 1,
    totalRetryDelay: 0
  },
  Type: 'User'
}

The error message displays that they are not in the same region. Why are the layers expected to be in us-east-1? I do not want them to be there.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions