从Java Web应用程序应用程序访问AWS Lambda函数是通过Https或Http完成的 [英] Accessing an AWS Lambda function from a java web application application is done over Https or Http

查看:166
本文介绍了从Java Web应用程序应用程序访问AWS Lambda函数是通过Https或Http完成的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在从Java代码访问lambda函数,我想知道我是针对该请求使用的是Https还是Https.我该怎么办.

I am accessing a lambda function from my java code and I would like to know if I am using Https or Https for that request. How can I do that.

这是我的方法的样子.

public interface FileScanService {

   @LambdaFunction( functionName = "s3-antivirus-api-scan" )
   public FileScanOutput scanFile( FileScanInput fileScanInput );
}

PS:此方法功能齐全.

PS: this method is fully functional.

推荐答案

更新:请参阅下面迈克尔的评论.事实证明,有一种方法可以直接通过HTTPS进行操作.

UPDATE: See the comment by Michael below. It turns out there is a way how to do it directly via HTTPS.

Lambda函数不会直接通过HTTP调用,因此您的问题的答案都不是.而是由一个或多个事件调用来源.

A Lambda function is not invoked directly via HTTP, so the answer to your question is neither. Instead, it is invoked by one or more of the event sources.

但是,它可以位于API网关后面,这将使它能够(间接)被HTTP请求调用.在这种情况下,请求是转换的转换为调用事件,这就是Lambda函数所使用的功能.

It can however sit behind an API Gateway which would enable it being (indirectly) invoked by an HTTP request. In that case, the request is transformed into an invocation event and that is what your Lambda function operates with.

这篇关于从Java Web应用程序应用程序访问AWS Lambda函数是通过Https或Http完成的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆