Can not run newrelic-lambda integrations install

I am trying to install the AWS lambda layer, however I’m instructed that I should first run (I can’t user the AWS secrets manager):
newrelic-lambda integrations install --nr-account-id ACCOUNT_ID --nr-api-key API_KEY

So that my license can be retrieved.

However I get the error desribed below when executing the command.

Either the user api key I created can’t access the graphql, or it can’t retrieve the license key (I created an Ingest License as there was no license present, which they say should be there in the documentation).

Can anyone help me with this?

I have tried different API keys, legacy REST api keys, created an ingest license as described above but nothing seems to make a difference.

Traceback (most recent call last):
File “/usr/local/lib/python3.8/site-packages/newrelic_lambda_cli/api.py”, line 326, in retrieve_license_key
__cached_license_key = gql.get_license_key()
File “/usr/local/lib/python3.8/site-packages/newrelic_lambda_cli/api.py”, line 87, in get_license_key
res = self.query(
File “/usr/local/lib/python3.8/site-packages/newrelic_lambda_cli/api.py”, line 49, in query
return self.client.execute(
File “/usr/local/lib/python3.8/site-packages/gql/client.py”, line 76, in execute
result = self._get_result(document, *args, **kwargs)
File “/usr/local/lib/python3.8/site-packages/gql/client.py”, line 84, in _get_result
return self.transport.execute(document, *args, **kwargs)
File “/usr/local/lib/python3.8/site-packages/gql/transport/requests.py”, line 124, in execute
response.raise_for_status()
File “/usr/local/lib/python3.8/site-packages/requests/models.py”, line 943, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://api.newrelic.com/graphql

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/local/lib/python3.8/site-packages/click/core.py”, line 782, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python3.8/site-packages/click/core.py”, line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python3.8/site-packages/click/core.py”, line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python3.8/site-packages/click/core.py”, line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python3.8/site-packages/click/core.py”, line 610, in invoke
return callback(*args, **kwargs)
File “/usr/local/lib/python3.8/site-packages/click/decorators.py”, line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File “/usr/local/lib/python3.8/site-packages/newrelic_lambda_cli/cli/integrations.py”, line 121, in install
nr_license_key = api.retrieve_license_key(gql_client)
File “/usr/local/lib/python3.8/site-packages/newrelic_lambda_cli/api.py”, line 329, in retrieve_license_key
raise click.BadParameter(
click.exceptions.BadParameter: Could not retrieve license key from New Relic. Check that your New Relic Account ID is valid and try again.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/local/bin/newrelic-lambda”, line 8, in
sys.exit(main())
File “/usr/local/lib/python3.8/site-packages/newrelic_lambda_cli/utils.py”, line 27, in _boto_error_wrapper
return func(*args, **kwargs)
File “/usr/local/lib/python3.8/site-packages/newrelic_lambda_cli/cli/init.py”, line 27, in main
cli()
File “/usr/local/lib/python3.8/site-packages/click/core.py”, line 829, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python3.8/site-packages/click/core.py”, line 799, in main
e.show()
File “/usr/local/lib/python3.8/site-packages/click/exceptions.py”, line 73, in show
echo(“Error: {}”.format(self.format_message()), file=file, color=color)
File “/usr/local/lib/python3.8/site-packages/click/exceptions.py”, line 103, in format_message
param_hint = self.param.get_error_hint(self.ctx)
AttributeError: ‘str’ object has no attribute ‘get_error_hint’

It turns out this was caused due to being in the EU and needing additional parameters.

Hi @gklesse, have you made further progress on this at all since you found out this was caused due to EU restrictions?