-
Notifications
You must be signed in to change notification settings - Fork 91
Description
Hello, I'm trying to deploy multiple services to localstack with serverless (specifically serverless compose - which is a serverless feature to run commands across multiple services in 1 shot)
folders structure:
- serverless-compose.yml
- services
- service-a
- lambdas
- hello (contains `handler.tsx`)
- serverless.yml
- etc...
The file serverless-compose.yml
contains:
services:
service-a:
path: ./services/service-a
Inside service-a
, the file serverless.yml
contains:
service: service-a
package:
individually: true
custom:
localstack:
stages:
- local
plugins:
- serverless-localstack
provider:
name: aws
runtime: nodejs20.x
region: us-east-1
functions:
hello:
handler: lambdas/hello/handler.handler
timeout: 900
When I run serverless deploy --stage local
to deploy to LocalStack at the serverless-compose.yml level, the command fails (not the case in a normal deployment to an AWS environment). And I got an error message "The specified bucket does not exist" (I attached an image with the error message for clarity)

When I try to deploy the same service to AWS without LocalStack:

What I tried to do:
Based on this: https://www.serverless.com/framework/docs/guides/deployment-bucket#3-deploying-with-compose, it seems that when using serverless compose, serverless tries to use 1 deployment bucket shared across services to simplify the process (instead of the standard a bucket per service when deploying without serverless compose). I tried creating a custom bucket in LocalStack and added the bucket to serverless.yml as follows:
# serverless.yml file
provider:
name: aws
runtime: nodejs20.x
region: us-east-1
deploymentBucket:
name: custom-deployment-bucket
But this didn't work, and I still got the same error message, "The specified bucket does not exist"
Any help is appreciated.