Skip to content

Commit

Permalink
Update lambda python runtime version in integration tests (#2065) (#2068
Browse files Browse the repository at this point in the history
)

[PR #2065/915cb0d5 backport][stable-7] Update lambda python runtime version in integration tests

This is a backport of PR #2065 as merged into main (915cb0d).
SUMMARY
The elb_target and s3_bucket_notification integration test targets were failing due to the python3.7 runtime no longer being supported. I have updated this to python3.12. While at it I went ahead and updated the secretsmanager_secret and sns_topic target runtimes from python3.9 to python3.12 too.
ISSUE TYPE

Bugfix Pull Request

Reviewed-by: Mike Graves <mgraves@redhat.com>
Reviewed-by: Alina Buzachis
  • Loading branch information
patchback[bot] committed Apr 4, 2024
1 parent 0220862 commit 5ad20e2
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions changelogs/fragments/20240402-lambda-test-runtime.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
trivial:
- integration tests - update lambda ``runtime`` parameter to python3.12 (https://github.com/ansible-collections/community.aws/pull/2065).
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
name: "{{ lambda_name }}"
state: present
zip_file: /tmp/lambda.zip
runtime: python3.7
runtime: python3.12
role: "{{ ROLE_ARN.arn }}"
handler: ansible_lambda_target.lambda_handler
timeout: 30
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
name: '{{ lambda_name }}'
state: present
role: "{{ lambda_role_name }}"
runtime: python3.7
runtime: python3.12
zip_file: '{{function_res.dest}}'
handler: lambda_function.lambda_handler
memory_size: '128'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
name: "{{ lambda_name }}"
state: present
zip_file: "{{ tmp.path }}/hello_world.zip"
runtime: 'python3.9'
runtime: 'python3.12'
role: "{{ iam_role_output.arn }}"
handler: 'hello_world.lambda_handler'
register: lambda_output
Expand Down Expand Up @@ -169,7 +169,7 @@
name: "{{ lambda_name }}"
state: absent
zip_file: "{{ tmp.path }}/hello_world.zip"
runtime: 'python3.9'
runtime: 'python3.12'
role: "{{ secret_manager_role }}"
handler: 'hello_world.lambda_handler'
ignore_errors: yes
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/targets/sns_topic/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@
name: '{{ sns_topic_lambda_name }}'
state: present
zip_file: '{{ tempdir.path }}/{{ sns_topic_lambda_function }}.zip'
runtime: python3.9
runtime: python3.12
role: '{{ sns_topic_lambda_role }}'
handler: '{{ sns_topic_lambda_function }}.handler'
register: lambda_result
Expand Down

0 comments on commit 5ad20e2

Please sign in to comment.