newrelic / newrelic/newrelic-lambda-cli
`newrelic-lambda integrations update` fails to update pre-0.9 stack due to `No newrelic-log-ingestion function in region ...` error
@Sashwatdas123 is already working on this.
Since Jul 29, 2025.
- Dominant language
- Python
- Stars
- 52
- Forks
- 54
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 3
Description
Description
Steps to Reproduce
- Create a stack with the "old" function name, i.e. using a CLI version 0.8.0 or earlier
- Attempt to update it with
newrelic-lambda integrations update ...using CLI version 0.9.0
Expected Behaviour
The update should succeed, either renaming the function or preserving it with the old name.
It looks like #254 may have introduced some if statements that aren't working as intended given its stated goal of preserving compatibility.
In addition, it would be nice if the logs were more specific about which function doesn't exist. I would've identified the problem with far less effort if the error printed out No newrelic-log-ingestion-0aa... function in region, given we do have function called newrelic-log-ingestion as literally appears in the error message.
Relevant Logs / Console output
The update fails, with error:
✖️ No newrelic-log-ingestion function in region 'ap-southeast-2'. Run 'newrelic-lambda integrations install' to install it.
✖️ Update Incomplete. See messages above for details.
I inserted debug logs like the following:
modified newrelic_lambda_cli/integrations.py
@@ -98,6 +98,7 @@ def get_newrelic_log_ingestion_function(session, stackname=None):
unique_log_ingestion_name = get_unique_newrelic_log_ingestion_name(
session, stackname
)
+ print(f"DEBUG: {unique_log_ingestion_name=}")
if unique_log_ingestion_name:
function = get_function(session, unique_log_ingestion_name)
return function
It prints DEBUG: unique_log_ingestion_name='newrelic-log-ingestion-0aa...'. That is, the function name has a unique suffix. Our AWS account indeed doesn't have a lambda with this name; although does have newrelic-log-ingestion.
Your Environment
macOS
# requirements.txt
newrelic-lambda-cli==0.9.0
boto3==1.34.59
botocore==1.34.59
jmespath==1.0.1
python-dateutil==2.9.0.post0
six==1.16.0
urllib3==2.0.7
s3transfer==0.10.0
click==8.1.7
colorama==0.4.6
emoji==2.10.1
gql==2.0.0
graphql-core==2.3.2
promise==2.3
Rx==1.6.3
requests==2.31.0
charset-normalizer==3.3.2
idna==3.6
certifi==2024.2.2
tabulate==0.9.0
Additional context
N/A
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.