Skip to content

Commit

Permalink
Merge pull request #157 from leslie-alldridge/patch-1
Browse files Browse the repository at this point in the history
Use python 3.10 lambda layer
  • Loading branch information
iamemilio authored Jun 27, 2023
2 parents 29540b7 + 4aa3ea2 commit 3597702
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions examples/sam/distributedtracing/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Resources:
Properties:
CodeUri: python/rest_handler/
Handler: newrelic_lambda_wrapper.handler
Runtime: python3.8
Runtime: python3.10
# Currently, we don't support Image based PackageType
PackageType: Zip
Environment:
Expand All @@ -46,7 +46,7 @@ Resources:
Layers:
# This layer includes the New Relic Lambda Extension, a sidecar process that sends telemetry,
# as well as the New Relic Agent for Python, and a handler wrapper that makes integration easy.
- !Sub arn:${AWS::Partition}:lambda:${AWS::Region}:451483290750:layer:NewRelicPython38:71
- !Sub arn:${AWS::Partition}:lambda:${AWS::Region}:451483290750:layer:NewRelicPython310:1
Policies:
# This policy allows the lambda to know the value of the New Relic license key. We need this so
# that we can send telemetry back to New Relic
Expand Down
4 changes: 2 additions & 2 deletions examples/sam/python/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Resources:
FunctionName: newrelic-example-python
# The handler for your function needs to be the one provided by the instrumentation layer, below.
Handler: newrelic_lambda_wrapper.handler
Runtime: python3.8
Runtime: python3.10
# Currently, we don't support Image based PackageType
PackageType: Zip
Environment:
Expand All @@ -31,7 +31,7 @@ Resources:
Layers:
# This layer includes the New Relic Lambda Extension, a sidecar process that sends telemetry,
# as well as the New Relic Agent for Python, and a handler wrapper that makes integration easy.
- !Sub arn:${AWS::Partition}:lambda:${AWS::Region}:451483290750:layer:NewRelicPython38:39
- !Sub arn:${AWS::Partition}:lambda:${AWS::Region}:451483290750:layer:NewRelicPython310:1
Policies:
# This policy allows the lambda to know the value of the New Relic licence key. We need this so
# that we can send telemetry back to New Relic
Expand Down
4 changes: 2 additions & 2 deletions examples/terraform/python/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ module "python_test_function" {
lambda_function_handler = "app.lambda_handler"
wrapper_handler = "newrelic_lambda_wrapper.handler"
lambda_function_name = "newrelic-terraform-example-python"
lambda_runtime = "python3.8"
lambda_runtime = "python3.10"
lambda_zip_filename = "function.zip"
newrelic_account_id = var.newrelic_account_id
newrelic_layer = "arn:aws:lambda:${var.aws_region}:451483290750:layer:NewRelicPython38:39"
newrelic_layer = "arn:aws:lambda:${var.aws_region}:451483290750:layer:NewRelicPython310:1"
}

0 comments on commit 3597702

Please sign in to comment.