Skip to content

Speeding up the runtime #49

Open
Open
@sondrelg

Description

@sondrelg

Hi!

Thanks for creating this project. Localstack has been very helpful in testing SQS/SNS locally! I'm currently on the non-pro version.

I just have one issue: in CI it takes over a minute to set up localstack for testing. Is there any way to speed this up? Here's a dump:

localstack/setup-localstack@v0.2.3
  with:
    image-tag: latest
    install-awslocal: true
    use-pro: false
    skip-startup: false
    skip-wait: false
    skip-ephemeral-stop: true
    state-backend: cloud-pods
    lifetime: 30

Would it, e.g., save time to skip installing the awslocal-cli and instead use the aws-cli with --endpoint localhost:4566? Are there other tricks like this you know of?

Activity

sondrelg

sondrelg commented on Apr 1, 2025

@sondrelg
Author

By replacing the action with:

- run: docker pull localstack/localstack &
...
- run: |
    docker run -d -p 4566:4566 localstack/localstack -e "SERVICES=sns,sqs"
    aws sns create-topic --name "foo"
    aws sqs create-queue --queue-name "bar"
  env:
    AWS_DEFAULT_REGION: us-east-1
    AWS_ACCESS_KEY_ID: test
    AWS_SECRET_ACCESS_KEY: test
    AWS_ENDPOINT_URL: http://localhost:4566

I'm able to get the runtime down to 5 + 15 seconds - down from ~1 minute

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

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @sondrelg

        Issue actions

          Speeding up the runtime · Issue #49 · localstack/setup-localstack