localstack / localstack

💻 A fully functional local AWS cloud stack. Develop and test your cloud & Serverless apps offline
https://localstack.cloud
Other
56.14k stars 4k forks source link

bug: API Key not recognized in latest builds #4253

Closed jrauen closed 3 years ago

jrauen commented 3 years ago

Is there an existing issue for this?

Current Behavior

The Pro API key is not registering in the latest docker builds and it is preventing the running of any pro services.

Expected Behavior

Pro services available when assigning the API key to LOCALSTACK_API_KEY environment variable.

How are you starting LocalStack?

With a docker-compose file

Steps To Reproduce

How are you starting localstack (e.g., bin/localstack command, arguments, or docker-compose.yml)

version: "3.3"
services:
  localstack:
    image: localstack/localstack:latest
    environment:
      SERVICES: "athena"
      LOCALSTACK_API_KEY: ${LOCALSTACK_API_KEY}
    ports:
      - "443:443"
      - "4566:4566"
      - "4571:4571"
docker-compose up

I have also attempted this with SERVICES=timestream.

Client commands (e.g., AWS SDK code snippet, or sequence of "awslocal" commands)

awslocal athena list-data-catalogs
localstack_1  | 2021-07-02T13:08:40:WARNING:localstack.services.edge: Unable to find listener for service "athena" - please make sure to include it in $SERVICES
localstack_1  | 2021-07-02T13:08:40:WARNING:localstack.utils.server.http2_server: Error in proxy handler for request POST http://localhost:4566/: Unable to find listener for service "athena" - please make sure to include it in $SERVICES Traceback (most recent call last):
localstack_1  |   File "/opt/code/localstack/localstack/utils/server/http2_server.py", line 127, in index
localstack_1  |     result = await run_sync(handler, request, data)
localstack_1  |   File "/opt/code/localstack/localstack/utils/async_utils.py", line 84, in run_sync
localstack_1  |     return await loop.run_in_executor(thread_pool, copy_context().run, func_wrapped)
localstack_1  |   File "/usr/lib/python3.7/concurrent/futures/thread.py", line 57, in run
localstack_1  |     result = self.fn(*self.args, **self.kwargs)
localstack_1  |   File "/opt/code/localstack/localstack/services/generic_proxy.py", line 431, in handler
localstack_1  |     client_address=request.remote_addr, server_address=parsed_url.netloc)
localstack_1  |   File "/opt/code/localstack/localstack/services/generic_proxy.py", line 245, in modify_and_forward
localstack_1  |     listener_result = listener.forward_request(method=method, path=path, data=data, headers=headers)
localstack_1  |   File "/opt/code/localstack/localstack/services/edge.py", line 122, in forward_request
localstack_1  |     return do_forward_request(api, method, path, data, headers, port=port)
localstack_1  |   File "/opt/code/localstack/localstack/services/edge.py", line 143, in do_forward_request
localstack_1  |     result = do_forward_request_inmem(api, method, path, data, headers, port=port)
localstack_1  |   File "/opt/code/localstack/localstack/services/edge.py", line 157, in do_forward_request_inmem
localstack_1  |     raise HTTPErrorResponse(message, code=400)
localstack_1  | localstack.utils.server.http2_server.HTTPErrorResponse: Unable to find listener for service "athena" - please make sure to include it in $SERVICES
awslocal timestream-write create-database --database-name test
localstack_1  | 2021-07-02T13:10:44:WARNING:localstack.services.edge: Unable to find listener for service "timestream" - please make sure to include it in $SERVICES
localstack_1  | 2021-07-02T13:10:44:WARNING:localstack.utils.server.http2_server: Error in proxy handler for request POST http://localhost:4566/: Unable to find listener for service "timestream" - please make sure to include it in $SERVICES Traceback (most recent call last):
localstack_1  |   File "/opt/code/localstack/localstack/utils/server/http2_server.py", line 127, in index
localstack_1  |     result = await run_sync(handler, request, data)
localstack_1  |   File "/opt/code/localstack/localstack/utils/async_utils.py", line 84, in run_sync
localstack_1  |     return await loop.run_in_executor(thread_pool, copy_context().run, func_wrapped)
localstack_1  |   File "/usr/lib/python3.7/concurrent/futures/thread.py", line 57, in run
localstack_1  |     result = self.fn(*self.args, **self.kwargs)
localstack_1  |   File "/opt/code/localstack/localstack/services/generic_proxy.py", line 431, in handler
localstack_1  |     client_address=request.remote_addr, server_address=parsed_url.netloc)
localstack_1  |   File "/opt/code/localstack/localstack/services/generic_proxy.py", line 245, in modify_and_forward
localstack_1  |     listener_result = listener.forward_request(method=method, path=path, data=data, headers=headers)
localstack_1  |   File "/opt/code/localstack/localstack/services/edge.py", line 122, in forward_request
localstack_1  |     return do_forward_request(api, method, path, data, headers, port=port)
localstack_1  |   File "/opt/code/localstack/localstack/services/edge.py", line 143, in do_forward_request
localstack_1  |     result = do_forward_request_inmem(api, method, path, data, headers, port=port)
localstack_1  |   File "/opt/code/localstack/localstack/services/edge.py", line 157, in do_forward_request_inmem
localstack_1  |     raise HTTPErrorResponse(message, code=400)
localstack_1  | localstack.utils.server.http2_server.HTTPErrorResponse: Unable to find listener for service "timestream" - please make sure to include it in $SERVICES

Environment

- OS: Windows 10
- LocalStack: 82564911a6ef, 258d2f8eedbf

Anything else?

Last good working version was 0.12.14.

whummer commented 3 years ago

Thanks for reporting this issue @jrauen ! Unfortunately, we had a small hiccup in our CI pipeline. This has been fixed in the meantime (in the latest Docker image). Please let us know if the problem persists. Thanks for your help!

jrauen commented 3 years ago

Confirmed! Thanks for the quick turnaround.