newrelic-lambda-cli 0.9.14__tar.gz → 0.9.16__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/PKG-INFO +8 -5
- {newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/README.md +7 -4
- {newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/newrelic_lambda_cli/api.py +12 -13
- {newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/newrelic_lambda_cli/cli/layers.py +6 -0
- {newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/newrelic_lambda_cli/layers.py +17 -4
- {newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/newrelic_lambda_cli/types.py +1 -0
- {newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/newrelic_lambda_cli/utils.py +8 -0
- {newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/newrelic_lambda_cli.egg-info/PKG-INFO +8 -5
- {newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/setup.py +1 -1
- {newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/tests/test_layers.py +4 -2
- {newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/CODE_OF_CONDUCT.md +0 -0
- {newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/CONTRIBUTING.md +0 -0
- {newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/LICENSE +0 -0
- {newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/MANIFEST.in +0 -0
- {newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/THIRD_PARTY_NOTICES.md +0 -0
- {newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/newrelic_lambda_cli/__init__.py +0 -0
- {newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/newrelic_lambda_cli/apm.py +0 -0
- {newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/newrelic_lambda_cli/cli/__init__.py +0 -0
- {newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/newrelic_lambda_cli/cli/apm.py +0 -0
- {newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/newrelic_lambda_cli/cli/decorators.py +0 -0
- {newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/newrelic_lambda_cli/cli/functions.py +0 -0
- {newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/newrelic_lambda_cli/cli/integrations.py +0 -0
- {newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/newrelic_lambda_cli/cli/otel_ingestions.py +0 -0
- {newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/newrelic_lambda_cli/cli/subscriptions.py +0 -0
- {newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/newrelic_lambda_cli/cliutils.py +0 -0
- {newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/newrelic_lambda_cli/functions.py +0 -0
- {newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/newrelic_lambda_cli/integrations.py +0 -0
- {newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/newrelic_lambda_cli/otel_ingestions.py +0 -0
- {newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/newrelic_lambda_cli/permissions.py +0 -0
- {newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/newrelic_lambda_cli/subscriptions.py +0 -0
- {newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/newrelic_lambda_cli/templates/import-template.yaml +0 -0
- {newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/newrelic_lambda_cli/templates/license-key-secret.yaml +0 -0
- {newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/newrelic_lambda_cli/templates/nr-lambda-integration-role.yaml +0 -0
- {newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/newrelic_lambda_cli.egg-info/SOURCES.txt +0 -0
- {newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/newrelic_lambda_cli.egg-info/dependency_links.txt +0 -0
- {newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/newrelic_lambda_cli.egg-info/entry_points.txt +0 -0
- {newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/newrelic_lambda_cli.egg-info/not-zip-safe +0 -0
- {newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/newrelic_lambda_cli.egg-info/requires.txt +0 -0
- {newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/newrelic_lambda_cli.egg-info/top_level.txt +0 -0
- {newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/pyproject.toml +0 -0
- {newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/setup.cfg +0 -0
- {newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/tests/test_api.py +0 -0
- {newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/tests/test_functions.py +0 -0
- {newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/tests/test_integrations.py +0 -0
- {newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/tests/test_new_relic_gql.py +0 -0
- {newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/tests/test_permissions.py +0 -0
- {newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/tests/test_subscriptions.py +0 -0
- {newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/tests/test_utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: newrelic-lambda-cli
|
|
3
|
-
Version: 0.9.
|
|
3
|
+
Version: 0.9.16
|
|
4
4
|
Summary: A CLI to install the New Relic AWS Lambda integration and layers.
|
|
5
5
|
Home-page: https://github.com/newrelic/newrelic-lambda-cli
|
|
6
6
|
Author: New Relic
|
|
@@ -64,11 +64,11 @@ A CLI to install the New Relic AWS Lambda integration and layers.
|
|
|
64
64
|
|
|
65
65
|
| Runtime | Versions |
|
|
66
66
|
|-------------|------------------------|
|
|
67
|
-
| Python | `python3.
|
|
68
|
-
| Node.js | `nodejs16.x`, `nodejs18.x`, `nodejs20.x`, `nodejs22.x` |
|
|
69
|
-
| .NET |
|
|
67
|
+
| Python | `python3.8`, `python3.9`, `python3.10`, `python3.11`, `python3.12`, `python3.13`, `python3.14` |
|
|
68
|
+
| Node.js | `nodejs16.x`, `nodejs18.x`, `nodejs20.x`, `nodejs22.x`, `nodejs24.x` |
|
|
69
|
+
| .NET | `dotnet6`, `dotnet8` |
|
|
70
70
|
| Java | `java8.al2`, `java11`, `java17`, `java21` |
|
|
71
|
-
| Provided | `provided
|
|
71
|
+
| Provided | `provided.al2`, `provided.al2023` |
|
|
72
72
|
| Ruby | `ruby3.2`, `ruby3.3`, `ruby3.4` |
|
|
73
73
|
|
|
74
74
|
**Note:** Automatic handler wrapping is only supported for Node.js, Python, Java, and Ruby. For other runtimes,
|
|
@@ -78,6 +78,7 @@ manual function wrapping is required using the runtime specific New Relic agent.
|
|
|
78
78
|
|
|
79
79
|
* Python >= 3.7 <= 3.13
|
|
80
80
|
* Retrieve your [New relic Account ID](https://docs.newrelic.com/docs/accounts/install-new-relic/account-setup/account-id) and [User API Key](https://docs.newrelic.com/docs/apis/get-started/intro-apis/types-new-relic-api-keys#user-api-key)
|
|
81
|
+
* Retrieve your [New Relic Ingest License Key](https://docs.newrelic.com/docs/apis/intro-apis/new-relic-api-keys/#personal-api-key)
|
|
81
82
|
|
|
82
83
|
## Recommendations
|
|
83
84
|
|
|
@@ -199,6 +200,7 @@ newrelic-lambda layers install \
|
|
|
199
200
|
| `--function` or `-f` | Yes | The AWS Lambda function name or ARN in which to add a layer. Can provide multiple `--function` arguments. Will also accept `all`, `installed` and `not-installed` similar to `newrelic-lambda functions list`. |
|
|
200
201
|
| `--nr-account-id` or `-a` | Yes | The [New Relic Account ID](https://docs.newrelic.com/docs/accounts/install-new-relic/account-setup/account-id) this function should use. Can also use the `NEW_RELIC_ACCOUNT_ID` environment variable. |
|
|
201
202
|
| `--exclude` or `-e` | No | A function name to exclude while installing layers. Can provide multiple `--exclude` arguments. Only checked when `all`, `installed` and `not-installed` are used. See `newrelic-lambda functions list` for function names. |
|
|
203
|
+
| `--slim` | No | The flag `--slim` adds the Node.js layer without OpenTelemetry dependencies, resulting in a lighter size. |
|
|
202
204
|
| `--layer-arn` or `-l` | No | Specify a specific layer version ARN to use. This is auto detected by default. |
|
|
203
205
|
| `--upgrade` or `-u` | No | Permit upgrade to the latest layer version for this region and runtime. |
|
|
204
206
|
| `--disable-extension` | No | Disable the [New Relic Lambda Extension](https://github.com/newrelic/newrelic-lambda-extension). |
|
|
@@ -209,6 +211,7 @@ newrelic-lambda layers install \
|
|
|
209
211
|
| `--aws-profile` or `-p` | No | The AWS profile to use for this command. Can also use `AWS_PROFILE`. Will also check `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` environment variables if not using AWS CLI. |
|
|
210
212
|
| `--aws-region` or `-r` | No | The AWS region this function is located. Can use `AWS_DEFAULT_REGION` environment variable. Defaults to AWS session region. |
|
|
211
213
|
| `--nr-api-key` or `-k` | No | Your [New Relic User API Key](https://docs.newrelic.com/docs/apis/get-started/intro-apis/types-new-relic-api-keys#user-api-key). Can also use the `NEW_RELIC_API_KEY` environment variable. Only used if `--enable-extension` is set and there is no New Relic license key in AWS Secrets Manager. |
|
|
214
|
+
| `--nr-ingest-key`| No | Your [New Relic Ingest License Key](https://docs.newrelic.com/docs/apis/intro-apis/new-relic-api-keys/#personal-api-key). Can be used without `--enable-extension` configured or license key in AWS Secrets Manager. |
|
|
212
215
|
| `--nr-region` | No | The New Relic region to use for the integration. Can use the `NEW_RELIC_REGION` environment variable. Can be either `eu` or `us`. Defaults to `us`. Only used if `--enable-extension` is set and there is no New Relic license key in AWS Secrets Manager. |
|
|
213
216
|
| `--nr-env-delimite` | No | Set `NR_ENV_DELIMITER` environment variable for your Lambda Function |
|
|
214
217
|
| `--nr-tags` | No | Set `NR_TAGS` environment variable for your Lambda Function |
|
|
@@ -38,11 +38,11 @@ A CLI to install the New Relic AWS Lambda integration and layers.
|
|
|
38
38
|
|
|
39
39
|
| Runtime | Versions |
|
|
40
40
|
|-------------|------------------------|
|
|
41
|
-
| Python | `python3.
|
|
42
|
-
| Node.js | `nodejs16.x`, `nodejs18.x`, `nodejs20.x`, `nodejs22.x` |
|
|
43
|
-
| .NET |
|
|
41
|
+
| Python | `python3.8`, `python3.9`, `python3.10`, `python3.11`, `python3.12`, `python3.13`, `python3.14` |
|
|
42
|
+
| Node.js | `nodejs16.x`, `nodejs18.x`, `nodejs20.x`, `nodejs22.x`, `nodejs24.x` |
|
|
43
|
+
| .NET | `dotnet6`, `dotnet8` |
|
|
44
44
|
| Java | `java8.al2`, `java11`, `java17`, `java21` |
|
|
45
|
-
| Provided | `provided
|
|
45
|
+
| Provided | `provided.al2`, `provided.al2023` |
|
|
46
46
|
| Ruby | `ruby3.2`, `ruby3.3`, `ruby3.4` |
|
|
47
47
|
|
|
48
48
|
**Note:** Automatic handler wrapping is only supported for Node.js, Python, Java, and Ruby. For other runtimes,
|
|
@@ -52,6 +52,7 @@ manual function wrapping is required using the runtime specific New Relic agent.
|
|
|
52
52
|
|
|
53
53
|
* Python >= 3.7 <= 3.13
|
|
54
54
|
* Retrieve your [New relic Account ID](https://docs.newrelic.com/docs/accounts/install-new-relic/account-setup/account-id) and [User API Key](https://docs.newrelic.com/docs/apis/get-started/intro-apis/types-new-relic-api-keys#user-api-key)
|
|
55
|
+
* Retrieve your [New Relic Ingest License Key](https://docs.newrelic.com/docs/apis/intro-apis/new-relic-api-keys/#personal-api-key)
|
|
55
56
|
|
|
56
57
|
## Recommendations
|
|
57
58
|
|
|
@@ -173,6 +174,7 @@ newrelic-lambda layers install \
|
|
|
173
174
|
| `--function` or `-f` | Yes | The AWS Lambda function name or ARN in which to add a layer. Can provide multiple `--function` arguments. Will also accept `all`, `installed` and `not-installed` similar to `newrelic-lambda functions list`. |
|
|
174
175
|
| `--nr-account-id` or `-a` | Yes | The [New Relic Account ID](https://docs.newrelic.com/docs/accounts/install-new-relic/account-setup/account-id) this function should use. Can also use the `NEW_RELIC_ACCOUNT_ID` environment variable. |
|
|
175
176
|
| `--exclude` or `-e` | No | A function name to exclude while installing layers. Can provide multiple `--exclude` arguments. Only checked when `all`, `installed` and `not-installed` are used. See `newrelic-lambda functions list` for function names. |
|
|
177
|
+
| `--slim` | No | The flag `--slim` adds the Node.js layer without OpenTelemetry dependencies, resulting in a lighter size. |
|
|
176
178
|
| `--layer-arn` or `-l` | No | Specify a specific layer version ARN to use. This is auto detected by default. |
|
|
177
179
|
| `--upgrade` or `-u` | No | Permit upgrade to the latest layer version for this region and runtime. |
|
|
178
180
|
| `--disable-extension` | No | Disable the [New Relic Lambda Extension](https://github.com/newrelic/newrelic-lambda-extension). |
|
|
@@ -183,6 +185,7 @@ newrelic-lambda layers install \
|
|
|
183
185
|
| `--aws-profile` or `-p` | No | The AWS profile to use for this command. Can also use `AWS_PROFILE`. Will also check `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` environment variables if not using AWS CLI. |
|
|
184
186
|
| `--aws-region` or `-r` | No | The AWS region this function is located. Can use `AWS_DEFAULT_REGION` environment variable. Defaults to AWS session region. |
|
|
185
187
|
| `--nr-api-key` or `-k` | No | Your [New Relic User API Key](https://docs.newrelic.com/docs/apis/get-started/intro-apis/types-new-relic-api-keys#user-api-key). Can also use the `NEW_RELIC_API_KEY` environment variable. Only used if `--enable-extension` is set and there is no New Relic license key in AWS Secrets Manager. |
|
|
188
|
+
| `--nr-ingest-key`| No | Your [New Relic Ingest License Key](https://docs.newrelic.com/docs/apis/intro-apis/new-relic-api-keys/#personal-api-key). Can be used without `--enable-extension` configured or license key in AWS Secrets Manager. |
|
|
186
189
|
| `--nr-region` | No | The New Relic region to use for the integration. Can use the `NEW_RELIC_REGION` environment variable. Can be either `eu` or `us`. Defaults to `us`. Only used if `--enable-extension` is set and there is no New Relic license key in AWS Secrets Manager. |
|
|
187
190
|
| `--nr-env-delimite` | No | Set `NR_ENV_DELIMITER` environment variable for your Lambda Function |
|
|
188
191
|
| `--nr-tags` | No | Set `NR_TAGS` environment variable for your Lambda Function |
|
|
@@ -96,24 +96,23 @@ class NewRelicGQL(object):
|
|
|
96
96
|
"""
|
|
97
97
|
res = self.query(
|
|
98
98
|
"""
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
99
|
+
query ($accountId: Int!) {
|
|
100
|
+
actor {
|
|
101
|
+
apiAccess {
|
|
102
|
+
keySearch(query: {types: INGEST, scope: {accountIds: [$accountId]}}) {
|
|
103
|
+
keys {
|
|
104
|
+
key
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
108
109
|
}
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
110
|
""",
|
|
112
111
|
accountId=self.account_id,
|
|
113
112
|
)
|
|
114
113
|
try:
|
|
115
|
-
return res["actor"]["
|
|
116
|
-
except KeyError:
|
|
114
|
+
return res["actor"]["apiAccess"]["keySearch"]["keys"][0]["key"]
|
|
115
|
+
except (KeyError, IndexError):
|
|
117
116
|
return None
|
|
118
117
|
|
|
119
118
|
def get_linked_account_by_id(self, id):
|
|
@@ -133,6 +133,12 @@ def register(group):
|
|
|
133
133
|
is_flag=True,
|
|
134
134
|
help="Enable sending Lambda function logs via the New Relic Lambda Extension",
|
|
135
135
|
)
|
|
136
|
+
@click.option(
|
|
137
|
+
"--slim",
|
|
138
|
+
is_flag=True,
|
|
139
|
+
default=False,
|
|
140
|
+
help="New Relic slim Layer without opentelemetry for Node.js",
|
|
141
|
+
)
|
|
136
142
|
@click.option(
|
|
137
143
|
"--disable-function-logs",
|
|
138
144
|
is_flag=True,
|
|
@@ -48,7 +48,12 @@ def index(region, runtime, architecture):
|
|
|
48
48
|
|
|
49
49
|
|
|
50
50
|
def layer_selection(
|
|
51
|
-
available_layers,
|
|
51
|
+
available_layers,
|
|
52
|
+
runtime,
|
|
53
|
+
architecture,
|
|
54
|
+
upgrade=False,
|
|
55
|
+
existing_layer_arn=None,
|
|
56
|
+
slim=False,
|
|
52
57
|
):
|
|
53
58
|
if upgrade and existing_layer_arn:
|
|
54
59
|
base_arn = existing_layer_arn.rsplit(":", 1)[0]
|
|
@@ -65,7 +70,11 @@ def layer_selection(
|
|
|
65
70
|
layer_options = [
|
|
66
71
|
layer["LatestMatchingVersion"]["LayerVersionArn"] for layer in available_layers
|
|
67
72
|
]
|
|
68
|
-
|
|
73
|
+
if slim:
|
|
74
|
+
for arn in layer_options:
|
|
75
|
+
if "-slim:" in arn:
|
|
76
|
+
success("Layer %s selected (slim)" % arn)
|
|
77
|
+
return arn
|
|
69
78
|
if sys.stdout.isatty():
|
|
70
79
|
output = "\n".join(
|
|
71
80
|
[
|
|
@@ -86,11 +95,14 @@ def layer_selection(
|
|
|
86
95
|
except IndexError:
|
|
87
96
|
failure("Invalid layer selection")
|
|
88
97
|
else:
|
|
89
|
-
|
|
98
|
+
click.echo(
|
|
90
99
|
"Discovered multiple layers for runtime %s (%s):\n%s\n"
|
|
91
|
-
"
|
|
100
|
+
"To add a particular Layer ARN use --layer-arn"
|
|
92
101
|
% (runtime, architecture, "\n".join(layer_options))
|
|
93
102
|
)
|
|
103
|
+
selected = layer_options[0]
|
|
104
|
+
success("Layer %s selected (auto)" % selected)
|
|
105
|
+
return selected
|
|
94
106
|
|
|
95
107
|
|
|
96
108
|
def _add_new_relic(input, config, nr_license_key):
|
|
@@ -167,6 +179,7 @@ def _add_new_relic(input, config, nr_license_key):
|
|
|
167
179
|
architecture,
|
|
168
180
|
upgrade=input.upgrade,
|
|
169
181
|
existing_layer_arn=existing_layer_arn,
|
|
182
|
+
slim=input.slim,
|
|
170
183
|
)
|
|
171
184
|
|
|
172
185
|
update_kwargs = {
|
|
@@ -44,6 +44,10 @@ RUNTIME_CONFIG = {
|
|
|
44
44
|
"Handler": "newrelic-lambda-wrapper.handler",
|
|
45
45
|
"LambdaExtension": True,
|
|
46
46
|
},
|
|
47
|
+
"nodejs24.x": {
|
|
48
|
+
"Handler": "newrelic-lambda-wrapper.handler",
|
|
49
|
+
"LambdaExtension": True,
|
|
50
|
+
},
|
|
47
51
|
"provided": {"LambdaExtension": True},
|
|
48
52
|
"provided.al2": {"LambdaExtension": True},
|
|
49
53
|
"provided.al2023": {"LambdaExtension": True},
|
|
@@ -75,6 +79,10 @@ RUNTIME_CONFIG = {
|
|
|
75
79
|
"Handler": "newrelic_lambda_wrapper.handler",
|
|
76
80
|
"LambdaExtension": True,
|
|
77
81
|
},
|
|
82
|
+
"python3.14": {
|
|
83
|
+
"Handler": "newrelic_lambda_wrapper.handler",
|
|
84
|
+
"LambdaExtension": True,
|
|
85
|
+
},
|
|
78
86
|
"ruby3.2": {
|
|
79
87
|
"Handler": "newrelic_lambda_wrapper.handler",
|
|
80
88
|
"LambdaExtension": True,
|
{newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/newrelic_lambda_cli.egg-info/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: newrelic-lambda-cli
|
|
3
|
-
Version: 0.9.
|
|
3
|
+
Version: 0.9.16
|
|
4
4
|
Summary: A CLI to install the New Relic AWS Lambda integration and layers.
|
|
5
5
|
Home-page: https://github.com/newrelic/newrelic-lambda-cli
|
|
6
6
|
Author: New Relic
|
|
@@ -64,11 +64,11 @@ A CLI to install the New Relic AWS Lambda integration and layers.
|
|
|
64
64
|
|
|
65
65
|
| Runtime | Versions |
|
|
66
66
|
|-------------|------------------------|
|
|
67
|
-
| Python | `python3.
|
|
68
|
-
| Node.js | `nodejs16.x`, `nodejs18.x`, `nodejs20.x`, `nodejs22.x` |
|
|
69
|
-
| .NET |
|
|
67
|
+
| Python | `python3.8`, `python3.9`, `python3.10`, `python3.11`, `python3.12`, `python3.13`, `python3.14` |
|
|
68
|
+
| Node.js | `nodejs16.x`, `nodejs18.x`, `nodejs20.x`, `nodejs22.x`, `nodejs24.x` |
|
|
69
|
+
| .NET | `dotnet6`, `dotnet8` |
|
|
70
70
|
| Java | `java8.al2`, `java11`, `java17`, `java21` |
|
|
71
|
-
| Provided | `provided
|
|
71
|
+
| Provided | `provided.al2`, `provided.al2023` |
|
|
72
72
|
| Ruby | `ruby3.2`, `ruby3.3`, `ruby3.4` |
|
|
73
73
|
|
|
74
74
|
**Note:** Automatic handler wrapping is only supported for Node.js, Python, Java, and Ruby. For other runtimes,
|
|
@@ -78,6 +78,7 @@ manual function wrapping is required using the runtime specific New Relic agent.
|
|
|
78
78
|
|
|
79
79
|
* Python >= 3.7 <= 3.13
|
|
80
80
|
* Retrieve your [New relic Account ID](https://docs.newrelic.com/docs/accounts/install-new-relic/account-setup/account-id) and [User API Key](https://docs.newrelic.com/docs/apis/get-started/intro-apis/types-new-relic-api-keys#user-api-key)
|
|
81
|
+
* Retrieve your [New Relic Ingest License Key](https://docs.newrelic.com/docs/apis/intro-apis/new-relic-api-keys/#personal-api-key)
|
|
81
82
|
|
|
82
83
|
## Recommendations
|
|
83
84
|
|
|
@@ -199,6 +200,7 @@ newrelic-lambda layers install \
|
|
|
199
200
|
| `--function` or `-f` | Yes | The AWS Lambda function name or ARN in which to add a layer. Can provide multiple `--function` arguments. Will also accept `all`, `installed` and `not-installed` similar to `newrelic-lambda functions list`. |
|
|
200
201
|
| `--nr-account-id` or `-a` | Yes | The [New Relic Account ID](https://docs.newrelic.com/docs/accounts/install-new-relic/account-setup/account-id) this function should use. Can also use the `NEW_RELIC_ACCOUNT_ID` environment variable. |
|
|
201
202
|
| `--exclude` or `-e` | No | A function name to exclude while installing layers. Can provide multiple `--exclude` arguments. Only checked when `all`, `installed` and `not-installed` are used. See `newrelic-lambda functions list` for function names. |
|
|
203
|
+
| `--slim` | No | The flag `--slim` adds the Node.js layer without OpenTelemetry dependencies, resulting in a lighter size. |
|
|
202
204
|
| `--layer-arn` or `-l` | No | Specify a specific layer version ARN to use. This is auto detected by default. |
|
|
203
205
|
| `--upgrade` or `-u` | No | Permit upgrade to the latest layer version for this region and runtime. |
|
|
204
206
|
| `--disable-extension` | No | Disable the [New Relic Lambda Extension](https://github.com/newrelic/newrelic-lambda-extension). |
|
|
@@ -209,6 +211,7 @@ newrelic-lambda layers install \
|
|
|
209
211
|
| `--aws-profile` or `-p` | No | The AWS profile to use for this command. Can also use `AWS_PROFILE`. Will also check `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` environment variables if not using AWS CLI. |
|
|
210
212
|
| `--aws-region` or `-r` | No | The AWS region this function is located. Can use `AWS_DEFAULT_REGION` environment variable. Defaults to AWS session region. |
|
|
211
213
|
| `--nr-api-key` or `-k` | No | Your [New Relic User API Key](https://docs.newrelic.com/docs/apis/get-started/intro-apis/types-new-relic-api-keys#user-api-key). Can also use the `NEW_RELIC_API_KEY` environment variable. Only used if `--enable-extension` is set and there is no New Relic license key in AWS Secrets Manager. |
|
|
214
|
+
| `--nr-ingest-key`| No | Your [New Relic Ingest License Key](https://docs.newrelic.com/docs/apis/intro-apis/new-relic-api-keys/#personal-api-key). Can be used without `--enable-extension` configured or license key in AWS Secrets Manager. |
|
|
212
215
|
| `--nr-region` | No | The New Relic region to use for the integration. Can use the `NEW_RELIC_REGION` environment variable. Can be either `eu` or `us`. Defaults to `us`. Only used if `--enable-extension` is set and there is no New Relic license key in AWS Secrets Manager. |
|
|
213
216
|
| `--nr-env-delimite` | No | Set `NR_ENV_DELIMITER` environment variable for your Lambda Function |
|
|
214
217
|
| `--nr-tags` | No | Set `NR_TAGS` environment variable for your Lambda Function |
|
|
@@ -6,7 +6,7 @@ README = open(os.path.join(os.path.dirname(__file__), "README.md"), "r").read()
|
|
|
6
6
|
|
|
7
7
|
setup(
|
|
8
8
|
name="newrelic-lambda-cli",
|
|
9
|
-
version="0.9.
|
|
9
|
+
version="0.9.16",
|
|
10
10
|
python_requires=">=3.3",
|
|
11
11
|
description="A CLI to install the New Relic AWS Lambda integration and layers.",
|
|
12
12
|
long_description=README,
|
|
@@ -148,6 +148,7 @@ def test_add_new_relic(aws_credentials, mock_function_config):
|
|
|
148
148
|
"x86_64",
|
|
149
149
|
upgrade=None,
|
|
150
150
|
existing_layer_arn=None,
|
|
151
|
+
slim=ANY,
|
|
151
152
|
)
|
|
152
153
|
assert "original_handler" in config["Configuration"]["Handler"]
|
|
153
154
|
|
|
@@ -199,8 +200,9 @@ def test_add_new_relic(aws_credentials, mock_function_config):
|
|
|
199
200
|
|
|
200
201
|
with patch("sys.stdout.isatty") as mock_isatty:
|
|
201
202
|
mock_isatty.return_value = False
|
|
202
|
-
|
|
203
|
-
|
|
203
|
+
|
|
204
|
+
selected = layer_selection(mock_layers, "python3.12", "x86_64")
|
|
205
|
+
assert selected == "arn:aws:lambda:us-east-1:123456789:layer/javajava"
|
|
204
206
|
|
|
205
207
|
config = mock_function_config("python3.12")
|
|
206
208
|
_add_new_relic(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/newrelic_lambda_cli/cli/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/newrelic_lambda_cli/cli/decorators.py
RENAMED
|
File without changes
|
{newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/newrelic_lambda_cli/cli/functions.py
RENAMED
|
File without changes
|
{newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/newrelic_lambda_cli/cli/integrations.py
RENAMED
|
File without changes
|
{newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/newrelic_lambda_cli/cli/otel_ingestions.py
RENAMED
|
File without changes
|
{newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/newrelic_lambda_cli/cli/subscriptions.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/newrelic_lambda_cli/integrations.py
RENAMED
|
File without changes
|
{newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/newrelic_lambda_cli/otel_ingestions.py
RENAMED
|
File without changes
|
{newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/newrelic_lambda_cli/permissions.py
RENAMED
|
File without changes
|
{newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/newrelic_lambda_cli/subscriptions.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/newrelic_lambda_cli.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/newrelic_lambda_cli.egg-info/not-zip-safe
RENAMED
|
File without changes
|
{newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/newrelic_lambda_cli.egg-info/requires.txt
RENAMED
|
File without changes
|
{newrelic_lambda_cli-0.9.14 → newrelic_lambda_cli-0.9.16}/newrelic_lambda_cli.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|