stratospheric icon indicating copy to clipboard operation
stratospheric copied to clipboard

local-aws-infrastructure.sh not invoked

Open giuliopulina opened this issue 1 year ago • 1 comments

What's going wrong and not working?

Hi,

with the current Localstack configuration, it seems that the script local-aws-infrastructure.sh is not invoked. The main issue is that Localstack container is now based on the LATEST image, and, since v2, the default path for initialization hooks has been changed to /etc/localstack/init/ready.d (see Localstack - init hooks) .

Expected outcome

Localstack should initialize AWS resources during container startup.

Issue can be fixed by changing the following line:

./src/test/resources/localstack/local-aws-infrastructure.sh:/docker-entrypoint-initaws.d/init.sh

to this one:

./src/test/resources/localstack/local-aws-infrastructure.sh:/etc/localstack/init/ready.d/init.sh

Furthermore, the following improvements can be made:

  • set a static version on localstack image (current latest is 3.1.0)
  • remove deprecated environment variables (DEFAULT_REGION, USE_SINGLE_REGION) and set the variable AWS_DEFAULT_REGION=eu-central-1 at the top of local-aws-infrastructure.sh

giuliopulina avatar Feb 07 '24 00:02 giuliopulina

Thanks for reporting it. Indeed, LocalStack improved a lot and we "just" bumped the version. We'll take a closer look and improve it 👍

rieckpil avatar Feb 07 '24 08:02 rieckpil