Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Speeding up the runtime #49

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

Open
sondrelg opened this issue Apr 1, 2025 · 1 comment
Open

Speeding up the runtime #49

sondrelg opened this issue Apr 1, 2025 · 1 comment

Comments

@sondrelg
Copy link

sondrelg commented Apr 1, 2025

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/[email protected]
  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?

@sondrelg
Copy link
Author

sondrelg commented Apr 1, 2025

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant