newrelic-lambda-cli 0.9.0__tar.gz → 0.9.1__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.
Files changed (44) hide show
  1. {newrelic-lambda-cli-0.9.0 → newrelic_lambda_cli-0.9.1}/PKG-INFO +6 -3
  2. {newrelic-lambda-cli-0.9.0 → newrelic_lambda_cli-0.9.1}/README.md +5 -2
  3. {newrelic-lambda-cli-0.9.0 → newrelic_lambda_cli-0.9.1}/newrelic_lambda_cli/cli/layers.py +20 -14
  4. {newrelic-lambda-cli-0.9.0 → newrelic_lambda_cli-0.9.1}/newrelic_lambda_cli/cli/subscriptions.py +18 -14
  5. {newrelic-lambda-cli-0.9.0 → newrelic_lambda_cli-0.9.1}/newrelic_lambda_cli/layers.py +1 -1
  6. {newrelic-lambda-cli-0.9.0 → newrelic_lambda_cli-0.9.1}/newrelic_lambda_cli/utils.py +13 -0
  7. {newrelic-lambda-cli-0.9.0 → newrelic_lambda_cli-0.9.1}/newrelic_lambda_cli.egg-info/PKG-INFO +6 -3
  8. {newrelic-lambda-cli-0.9.0 → newrelic_lambda_cli-0.9.1}/setup.py +1 -1
  9. {newrelic-lambda-cli-0.9.0 → newrelic_lambda_cli-0.9.1}/tests/test_utils.py +1 -0
  10. {newrelic-lambda-cli-0.9.0 → newrelic_lambda_cli-0.9.1}/CODE_OF_CONDUCT.md +0 -0
  11. {newrelic-lambda-cli-0.9.0 → newrelic_lambda_cli-0.9.1}/CONTRIBUTING.md +0 -0
  12. {newrelic-lambda-cli-0.9.0 → newrelic_lambda_cli-0.9.1}/LICENSE +0 -0
  13. {newrelic-lambda-cli-0.9.0 → newrelic_lambda_cli-0.9.1}/MANIFEST.in +0 -0
  14. {newrelic-lambda-cli-0.9.0 → newrelic_lambda_cli-0.9.1}/THIRD_PARTY_NOTICES.md +0 -0
  15. {newrelic-lambda-cli-0.9.0 → newrelic_lambda_cli-0.9.1}/newrelic_lambda_cli/__init__.py +0 -0
  16. {newrelic-lambda-cli-0.9.0 → newrelic_lambda_cli-0.9.1}/newrelic_lambda_cli/api.py +0 -0
  17. {newrelic-lambda-cli-0.9.0 → newrelic_lambda_cli-0.9.1}/newrelic_lambda_cli/cli/__init__.py +0 -0
  18. {newrelic-lambda-cli-0.9.0 → newrelic_lambda_cli-0.9.1}/newrelic_lambda_cli/cli/decorators.py +0 -0
  19. {newrelic-lambda-cli-0.9.0 → newrelic_lambda_cli-0.9.1}/newrelic_lambda_cli/cli/functions.py +0 -0
  20. {newrelic-lambda-cli-0.9.0 → newrelic_lambda_cli-0.9.1}/newrelic_lambda_cli/cli/integrations.py +0 -0
  21. {newrelic-lambda-cli-0.9.0 → newrelic_lambda_cli-0.9.1}/newrelic_lambda_cli/cliutils.py +0 -0
  22. {newrelic-lambda-cli-0.9.0 → newrelic_lambda_cli-0.9.1}/newrelic_lambda_cli/functions.py +0 -0
  23. {newrelic-lambda-cli-0.9.0 → newrelic_lambda_cli-0.9.1}/newrelic_lambda_cli/integrations.py +0 -0
  24. {newrelic-lambda-cli-0.9.0 → newrelic_lambda_cli-0.9.1}/newrelic_lambda_cli/permissions.py +0 -0
  25. {newrelic-lambda-cli-0.9.0 → newrelic_lambda_cli-0.9.1}/newrelic_lambda_cli/subscriptions.py +0 -0
  26. {newrelic-lambda-cli-0.9.0 → newrelic_lambda_cli-0.9.1}/newrelic_lambda_cli/templates/import-template.yaml +0 -0
  27. {newrelic-lambda-cli-0.9.0 → newrelic_lambda_cli-0.9.1}/newrelic_lambda_cli/templates/license-key-secret.yaml +0 -0
  28. {newrelic-lambda-cli-0.9.0 → newrelic_lambda_cli-0.9.1}/newrelic_lambda_cli/templates/nr-lambda-integration-role.yaml +0 -0
  29. {newrelic-lambda-cli-0.9.0 → newrelic_lambda_cli-0.9.1}/newrelic_lambda_cli/types.py +0 -0
  30. {newrelic-lambda-cli-0.9.0 → newrelic_lambda_cli-0.9.1}/newrelic_lambda_cli.egg-info/SOURCES.txt +0 -0
  31. {newrelic-lambda-cli-0.9.0 → newrelic_lambda_cli-0.9.1}/newrelic_lambda_cli.egg-info/dependency_links.txt +0 -0
  32. {newrelic-lambda-cli-0.9.0 → newrelic_lambda_cli-0.9.1}/newrelic_lambda_cli.egg-info/entry_points.txt +0 -0
  33. {newrelic-lambda-cli-0.9.0 → newrelic_lambda_cli-0.9.1}/newrelic_lambda_cli.egg-info/not-zip-safe +0 -0
  34. {newrelic-lambda-cli-0.9.0 → newrelic_lambda_cli-0.9.1}/newrelic_lambda_cli.egg-info/requires.txt +0 -0
  35. {newrelic-lambda-cli-0.9.0 → newrelic_lambda_cli-0.9.1}/newrelic_lambda_cli.egg-info/top_level.txt +0 -0
  36. {newrelic-lambda-cli-0.9.0 → newrelic_lambda_cli-0.9.1}/pyproject.toml +0 -0
  37. {newrelic-lambda-cli-0.9.0 → newrelic_lambda_cli-0.9.1}/setup.cfg +0 -0
  38. {newrelic-lambda-cli-0.9.0 → newrelic_lambda_cli-0.9.1}/tests/test_api.py +0 -0
  39. {newrelic-lambda-cli-0.9.0 → newrelic_lambda_cli-0.9.1}/tests/test_functions.py +0 -0
  40. {newrelic-lambda-cli-0.9.0 → newrelic_lambda_cli-0.9.1}/tests/test_integrations.py +0 -0
  41. {newrelic-lambda-cli-0.9.0 → newrelic_lambda_cli-0.9.1}/tests/test_layers.py +0 -0
  42. {newrelic-lambda-cli-0.9.0 → newrelic_lambda_cli-0.9.1}/tests/test_new_relic_gql.py +0 -0
  43. {newrelic-lambda-cli-0.9.0 → newrelic_lambda_cli-0.9.1}/tests/test_permissions.py +0 -0
  44. {newrelic-lambda-cli-0.9.0 → newrelic_lambda_cli-0.9.1}/tests/test_subscriptions.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: newrelic-lambda-cli
3
- Version: 0.9.0
3
+ Version: 0.9.1
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
@@ -46,7 +46,7 @@ A CLI to install the New Relic AWS Lambda integration and layers.
46
46
  * Installs and configures a New Relic AWS Lambda layer onto your AWS Lambda functions
47
47
  * Automatically selects the correct New Relic layer for your function's runtime and region
48
48
  * Wraps your AWS Lambda functions without requiring a code change
49
- * Supports Go, Java, .NET, Node.js and Python AWS Lambda runtimes
49
+ * Supports Go, Java, .NET, Node.js, Python, and Ruby AWS Lambda runtimes
50
50
  * Easily uninstall the AWS Lambda layer with a single command
51
51
 
52
52
  ## Runtimes Supported
@@ -55,6 +55,7 @@ A CLI to install the New Relic AWS Lambda integration and layers.
55
55
  * java8.al2
56
56
  * java11
57
57
  * java17
58
+ * java21
58
59
  * nodejs16.x
59
60
  * nodejs18.x
60
61
  * nodejs20.x
@@ -66,8 +67,10 @@ A CLI to install the New Relic AWS Lambda integration and layers.
66
67
  * python3.10
67
68
  * python3.11
68
69
  * python3.12
70
+ * ruby3.2
71
+ * ruby3.3
69
72
 
70
- **Note:** Automatic handler wrapping is only supported for Node.js, Python and Java. For other runtimes,
73
+ **Note:** Automatic handler wrapping is only supported for Node.js, Python, Java, and Ruby. For other runtimes,
71
74
  manual function wrapping is required using the runtime specific New Relic agent.
72
75
 
73
76
  ## Requirements
@@ -28,7 +28,7 @@ A CLI to install the New Relic AWS Lambda integration and layers.
28
28
  * Installs and configures a New Relic AWS Lambda layer onto your AWS Lambda functions
29
29
  * Automatically selects the correct New Relic layer for your function's runtime and region
30
30
  * Wraps your AWS Lambda functions without requiring a code change
31
- * Supports Go, Java, .NET, Node.js and Python AWS Lambda runtimes
31
+ * Supports Go, Java, .NET, Node.js, Python, and Ruby AWS Lambda runtimes
32
32
  * Easily uninstall the AWS Lambda layer with a single command
33
33
 
34
34
  ## Runtimes Supported
@@ -37,6 +37,7 @@ A CLI to install the New Relic AWS Lambda integration and layers.
37
37
  * java8.al2
38
38
  * java11
39
39
  * java17
40
+ * java21
40
41
  * nodejs16.x
41
42
  * nodejs18.x
42
43
  * nodejs20.x
@@ -48,8 +49,10 @@ A CLI to install the New Relic AWS Lambda integration and layers.
48
49
  * python3.10
49
50
  * python3.11
50
51
  * python3.12
52
+ * ruby3.2
53
+ * ruby3.3
51
54
 
52
- **Note:** Automatic handler wrapping is only supported for Node.js, Python and Java. For other runtimes,
55
+ **Note:** Automatic handler wrapping is only supported for Node.js, Python, Java, and Ruby. For other runtimes,
53
56
  manual function wrapping is required using the runtime specific New Relic agent.
54
57
 
55
58
  ## Requirements
@@ -108,12 +108,6 @@ def install(ctx, **kwargs):
108
108
  """Install New Relic AWS Lambda Layers"""
109
109
  input = LayerInstall(session=None, verbose=ctx.obj["VERBOSE"], **kwargs)
110
110
 
111
- input = input._replace(
112
- session=boto3.Session(
113
- profile_name=input.aws_profile, region_name=input.aws_region
114
- )
115
- )
116
-
117
111
  if input.aws_permissions_check:
118
112
  permissions.ensure_layer_install_permissions(input)
119
113
 
@@ -121,7 +115,16 @@ def install(ctx, **kwargs):
121
115
 
122
116
  with ThreadPoolExecutor() as executor:
123
117
  futures = [
124
- executor.submit(layers.install, input, function) for function in functions
118
+ executor.submit(
119
+ layers.install,
120
+ input._replace(
121
+ session=boto3.Session(
122
+ profile_name=input.aws_profile, region_name=input.aws_region
123
+ )
124
+ ),
125
+ function,
126
+ )
127
+ for function in functions
125
128
  ]
126
129
  install_success = all(future.result() for future in as_completed(futures))
127
130
 
@@ -179,12 +182,6 @@ def uninstall(ctx, **kwargs):
179
182
  """Uninstall New Relic AWS Lambda Layers"""
180
183
  input = LayerUninstall(session=None, verbose=ctx.obj["VERBOSE"], **kwargs)
181
184
 
182
- input = input._replace(
183
- session=boto3.Session(
184
- profile_name=input.aws_profile, region_name=input.aws_region
185
- )
186
- )
187
-
188
185
  if input.aws_permissions_check:
189
186
  permissions.ensure_layer_uninstall_permissions(input)
190
187
 
@@ -192,7 +189,16 @@ def uninstall(ctx, **kwargs):
192
189
 
193
190
  with ThreadPoolExecutor() as executor:
194
191
  futures = [
195
- executor.submit(layers.uninstall, input, function) for function in functions
192
+ executor.submit(
193
+ layers.uninstall,
194
+ input._replace(
195
+ session=boto3.Session(
196
+ profile_name=input.aws_profile, region_name=input.aws_region
197
+ )
198
+ ),
199
+ function,
200
+ )
201
+ for function in functions
196
202
  ]
197
203
  uninstall_success = all(future.result() for future in as_completed(futures))
198
204
 
@@ -65,12 +65,6 @@ def install(**kwargs):
65
65
  """Install New Relic AWS Lambda Log Subscriptions"""
66
66
  input = SubscriptionInstall(session=None, **kwargs)
67
67
 
68
- input = input._replace(
69
- session=boto3.Session(
70
- profile_name=input.aws_profile, region_name=input.aws_region
71
- )
72
- )
73
-
74
68
  if input.aws_permissions_check:
75
69
  permissions.ensure_subscription_install_permissions(input)
76
70
 
@@ -78,7 +72,15 @@ def install(**kwargs):
78
72
 
79
73
  with ThreadPoolExecutor() as executor:
80
74
  futures = [
81
- executor.submit(subscriptions.create_log_subscription, input, function)
75
+ executor.submit(
76
+ subscriptions.create_log_subscription,
77
+ input._replace(
78
+ session=boto3.Session(
79
+ profile_name=input.aws_profile, region_name=input.aws_region
80
+ )
81
+ ),
82
+ function,
83
+ )
82
84
  for function in functions
83
85
  ]
84
86
  install_success = all(future.result() for future in as_completed(futures))
@@ -120,12 +122,6 @@ def uninstall(**kwargs):
120
122
  """Uninstall New Relic AWS Lambda Log Subscriptions"""
121
123
  input = SubscriptionUninstall(session=None, **kwargs)
122
124
 
123
- input = input._replace(
124
- session=boto3.Session(
125
- profile_name=input.aws_profile, region_name=input.aws_region
126
- )
127
- )
128
-
129
125
  if input.aws_permissions_check:
130
126
  permissions.ensure_subscription_uninstall_permissions(input)
131
127
 
@@ -133,7 +129,15 @@ def uninstall(**kwargs):
133
129
 
134
130
  with ThreadPoolExecutor() as executor:
135
131
  futures = [
136
- executor.submit(subscriptions.remove_log_subscription, input, function)
132
+ executor.submit(
133
+ subscriptions.remove_log_subscription,
134
+ input._replace(
135
+ session=boto3.Session(
136
+ profile_name=input.aws_profile, region_name=input.aws_region
137
+ )
138
+ ),
139
+ function,
140
+ )
137
141
  for function in functions
138
142
  ]
139
143
  uninstall_success = all(future.result() for future in as_completed(futures))
@@ -153,7 +153,7 @@ def _add_new_relic(input, config, nr_license_key):
153
153
  if any("NewRelicLambdaExtension" in s for s in new_relic_layer):
154
154
  runtime_handler = None
155
155
 
156
- # Only used by Python, Node.js and Java runtimes not using the
156
+ # Only used by Python, Node.js, Ruby, and Java runtimes not using the
157
157
  # NewRelicLambdaExtension layer
158
158
  if runtime_handler:
159
159
  update_kwargs["Handler"] = runtime_handler
@@ -10,6 +10,10 @@ NR_DOCS_ACT_LINKING_URL = "https://docs.newrelic.com/docs/serverless-function-mo
10
10
  NEW_RELIC_ARN_PREFIX_TEMPLATE = "arn:aws:lambda:%s:451483290750"
11
11
  RUNTIME_CONFIG = {
12
12
  "dotnetcore3.1": {"LambdaExtension": True},
13
+ "java21": {
14
+ "Handler": "com.newrelic.java.HandlerWrapper::",
15
+ "LambdaExtension": True,
16
+ },
13
17
  "java17": {
14
18
  "Handler": "com.newrelic.java.HandlerWrapper::",
15
19
  "LambdaExtension": True,
@@ -36,6 +40,7 @@ RUNTIME_CONFIG = {
36
40
  },
37
41
  "provided": {"LambdaExtension": True},
38
42
  "provided.al2": {"LambdaExtension": True},
43
+ "provided.al2023": {"LambdaExtension": True},
39
44
  "python3.7": {
40
45
  "Handler": "newrelic_lambda_wrapper.handler",
41
46
  "LambdaExtension": True,
@@ -60,6 +65,14 @@ RUNTIME_CONFIG = {
60
65
  "Handler": "newrelic_lambda_wrapper.handler",
61
66
  "LambdaExtension": True,
62
67
  },
68
+ "ruby3.2": {
69
+ "Handler": "newrelic_lambda_wrapper.handler",
70
+ "LambdaExtension": True,
71
+ },
72
+ "ruby3.3": {
73
+ "Handler": "newrelic_lambda_wrapper.handler",
74
+ "LambdaExtension": True,
75
+ },
63
76
  }
64
77
 
65
78
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: newrelic-lambda-cli
3
- Version: 0.9.0
3
+ Version: 0.9.1
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
@@ -46,7 +46,7 @@ A CLI to install the New Relic AWS Lambda integration and layers.
46
46
  * Installs and configures a New Relic AWS Lambda layer onto your AWS Lambda functions
47
47
  * Automatically selects the correct New Relic layer for your function's runtime and region
48
48
  * Wraps your AWS Lambda functions without requiring a code change
49
- * Supports Go, Java, .NET, Node.js and Python AWS Lambda runtimes
49
+ * Supports Go, Java, .NET, Node.js, Python, and Ruby AWS Lambda runtimes
50
50
  * Easily uninstall the AWS Lambda layer with a single command
51
51
 
52
52
  ## Runtimes Supported
@@ -55,6 +55,7 @@ A CLI to install the New Relic AWS Lambda integration and layers.
55
55
  * java8.al2
56
56
  * java11
57
57
  * java17
58
+ * java21
58
59
  * nodejs16.x
59
60
  * nodejs18.x
60
61
  * nodejs20.x
@@ -66,8 +67,10 @@ A CLI to install the New Relic AWS Lambda integration and layers.
66
67
  * python3.10
67
68
  * python3.11
68
69
  * python3.12
70
+ * ruby3.2
71
+ * ruby3.3
69
72
 
70
- **Note:** Automatic handler wrapping is only supported for Node.js, Python and Java. For other runtimes,
73
+ **Note:** Automatic handler wrapping is only supported for Node.js, Python, Java, and Ruby. For other runtimes,
71
74
  manual function wrapping is required using the runtime specific New Relic agent.
72
75
 
73
76
  ## Requirements
@@ -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.0",
9
+ version="0.9.1",
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,
@@ -77,6 +77,7 @@ def test_supports_lambda_extension():
77
77
  supports_lambda_extension(runtime)
78
78
  for runtime in (
79
79
  "dotnetcore3.1",
80
+ "java21",
80
81
  "java17",
81
82
  "java11",
82
83
  "java8.al2",