aws / aws/sagemaker-python-sdk

Can I create lambda step from ecr image by using Lambda class in lambda_help.py?

Đang mở
#4,819 0 bình luận 1 reaction 1 người được giao Được @mollyheamazon nhận Xem trên GitHub
component: pipelines type: feature request
Ngôn ngữ chính
Python
Star
2.3k
Fork
1.3k
Merge trung bình
1 ngày 22 giờ
Pull request đã merge (30 ngày)
35

Mô tả

**Describe the feature you'd like**
Hey! As I read from the code in lambda_helper.py, I only see Lambda class wrapped creating lambda function from a script. Is there any reason it does not support creating function from ecr images?

**How would this feature be used? Please describe.**
should be a parameter that I can refer to the image uri:
```
Lambda(
function_name="function_name",
execution_role_arn=params["pipeline_steps_arn"],
image="image_uri"
handler=step_config["handler"],
session=session,
timeout=step_config["timeout"],
memory_size=step_config["memory_size"],
runtime=step_config["runtime"],
)
```

Currently, I did in this way (from boto3 lambda client call):
```
response = lambda_client.create_function(
FunctionName=function_name,
Role=params["pipeline_steps_arn"],
Code={"ImageUri": step_config["image_uri"]},
PackageType="Image",
Timeout=step_config["timeout"],
MemorySize=step_config["memory_size"],
Architectures=["x86_64"],
)
return Lambda(function_arn=response["FunctionArn"], session=session)
```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.