aws / aws/sagemaker-python-sdk

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

未关闭
#4,819 0 条评论 1 个 reaction 已指派 1 人 已被 @mollyheamazon 认领 在 GitHub 查看
component: pipelines type: feature request
主要语言
Python
星标
2.3k
派生
1.3k
平均合并
1 天 22 小时
30 天内合并 PR
35

描述

**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)
```

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。