简体   繁体   中英

Run containers on AWS Lambda

I am trying to use the newly launched service ie running containers on AWS lambda. But since this whole idea is quite new I am unable to find much support online.

Question: Is there a programmatic way to publish a new ECR image into lambda with all the configurations, using AWS SDK (preferably python)?

Also, can it directly be published version instead of

def pushLatestAsVesion(functionArn, description="Lambda Eenvironment"):
    functionDetails = client.get_function(FunctionName=functionArn)
    config = functionDetails['Configuration']
    response = client.publish_version(
        FunctionName=functionArn,
        Description=description,
        CodeSha256=functionDetails['Configuration']['CodeSha256'],
        RevisionId=functionDetails['Configuration']['RevisionId']
    )
    print(response)
pushLatestAsVesion('arn:aws:lambda:ap-southeast-1:*************:function:my-serverless-fn')

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM