You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Taragolis (via GitHub)" <gi...@apache.org> on 2023/02/09 16:59:26 UTC

[GitHub] [airflow] Taragolis commented on a diff in pull request #29443: Use an Amazon Linux 2 image to run EMR job

Taragolis commented on code in PR #29443:
URL: https://github.com/apache/airflow/pull/29443#discussion_r1101768568


##########
tests/system/providers/amazon/aws/example_emr.py:
##########
@@ -90,6 +90,16 @@
 # [END howto_operator_emr_steps_config]
 
 
+@task
+def get_ami_id():
+    """
+    Returns an AL2 AMI compatible with EMR
+    """
+    return boto3.client("ssm").get_parameter(
+        Name="/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-ebs",
+    )["Parameter"]["Value"]

Review Comment:
   ```suggestion
       return SsmHook(aws_conn_id=None).get_parameter_value(
           "/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-ebs"
       )
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org