我對 AWS 非常陌生,在我作業的公司,我一直在使用 AWS Toolkit for Eclipse 將 Java Lambda 函式上傳到 AWS。我只需在 Eclipse 中右鍵單擊該專案 > 單擊AWS Lambda> 單擊upload function to AWS Lambda。
從那里,我的專案被上傳到 Lambda。但是,我收到了一封來自 AWS 的電子郵件,其中提到他們正在推出可能帶有impact certain workflows that attempt to invoke or modify a function shortly after a create or an update action. 根據他們在電子郵件中發送的
與這個沒有答案的問題是相同的問題:SO question
uj5u.com熱心網友回復:
我決定不再使用 Eclispe Toolkit。相反,我將所有外部 jar 檔案放入其中src/main/resources并撰寫了一個批處理腳本,將這些檔案添加到本地 maven repo 中。我的批處理腳本中兩行的示例。我對每個檔案都這樣做:
EHCO starting
CALL mvn install:install-file -Dfile="./src/main/resources/routines.jar" -DgroupId=talend-jars -DartifactId=test-eenav-routine -Dversion=1.0 -Dpackaging=jar
CALL mvn install:install-file -Dfile="./src/main/resources/currenttalendproject_0_1.jar" -DgroupId=talend-jars -DartifactId=test-eenav-main-talend-jar -Dversion=1.0 -Dpackaging=jar
CALL mvn package
在我呼叫的上述腳本的末尾,CALL mvn package它生成了可以上傳到 AWS Lambda 的著色 JAR。
這是 pom 檔案,顯示了我對著色插件的配置以及我添加到本地 maven 存盤庫的兩個依賴項:
<build>
<sourceDirectory>src/main/java</sourceDirectory>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
<testSourceDirectory>src/test/java</testSourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>UTF-8</encoding>
<forceJavacCompilerUse>true</forceJavacCompilerUse>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.2</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<finalName>Demo-SHADED</finalName>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>talend-jars</groupId>
<artifactId>test-eenav-routine</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>talend-jars</groupId>
<artifactId>test-eenav-main-talend-jar</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/336962.html
標籤:亚马逊网络服务 蚀 亚马逊-s3 aws-lambda
上一篇:Eclipse:歡迎使用Modelica開發工具(MDT)控制臺-空回復:
下一篇:跨多個github存盤庫管理問題
