Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output Bug - Serverless compose #414

Open
LuccaRebelloToledo opened this issue Dec 24, 2024 · 2 comments
Open

Output Bug - Serverless compose #414

LuccaRebelloToledo opened this issue Dec 24, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@LuccaRebelloToledo
Copy link

LuccaRebelloToledo commented Dec 24, 2024

Description

I using serverless compose to make the deploy of my services but if i try to make a deploy or remove, i receive this error:

✖ Service
    Resolution error: No construct named 'ServiceQueue' was found, the ${construct:ServiceQueue.queueArn} variable is invalid..   
Object creation stack:
  at Execute again with CDK_DEBUG=true to capture stack traces

Who can i solve this? If I pass the raw value, i can make the deploy or remove.

Maybe the problem is it on Serverless Compose because, if i try make the deploy specifying "Service", its ok. But, if i try to make all services deploy, i receive that error.

How to Reproduce

service: Service

package:
  individually: true
  excludeDevDependencies: true

build:
  esbuild:
    bundle: true
    minify: true
    sourcemap: 
      type: linked
      setNodeOptions: true
    exclude: 
      - '@aws-sdk/*'
    target: 'node22'
    define: { 'require.resolve': undefined }
    platform: 'node'
    buildConcurrency: 10

provider:
  name: aws
  runtime: nodejs22.x
  architecture: arm64
  stage: ${opt:stage, 'dev'}
  region: ${param:REGION}
  memorySize: 1024
  timeout: 900
  environment:
    NODE_ENV: ${param:NODE_ENV}
    TZ: ${param:TZ}
    LOG_LEVEL: ${param:LOG_LEVEL}
    REGION: ${param:REGION}
  iam:
    role:
      managedPolicies:
        - arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole

plugins:
  - serverless-lift

constructs:
  ServiceQueue:
    type: queue
    fifo: true
    batchSize: 1
    worker:
      handler: index.handler
      timeout: 900

resources:
  Outputs:
    ServiceQueueArn:
      Value: ${construct:ServiceQueue.queueArn}
      Export:
        Name: ServiceQueueArn

### Additional Information

Serverless Framework: 4.4.18
Serverless Lift: 1.30.3
@LuccaRebelloToledo LuccaRebelloToledo added the bug Something isn't working label Dec 24, 2024
@mnapoli
Copy link
Member

mnapoli commented Dec 26, 2024

Maybe the problem is it on Serverless Compose because, if i try make the deploy specifying "Service", its ok. But, if i try to make all services deploy, i receive that error.

Yeah that is weird, it seems to be related to Serverless Compose deployments. Do you get the same error if you deploy with Serverless Framework v3 as well? (I know v4 changed a lot of things under the hood, I'm curious if Serverless Compose changed some things here)

@LuccaRebelloToledo
Copy link
Author

No, i don't. I will try with v3 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants