diff --git a/PaimonGanyu/paimonganyu-app/paimonganyu-skill/build.gradle b/PaimonGanyu/paimonganyu-app/paimonganyu-skill/build.gradle index d9403bda..bb3c1472 100644 --- a/PaimonGanyu/paimonganyu-app/paimonganyu-skill/build.gradle +++ b/PaimonGanyu/paimonganyu-app/paimonganyu-skill/build.gradle @@ -8,7 +8,6 @@ dependencies { implementation project(':ikakao') implementation 'org.springframework.boot:spring-boot-starter-data-jpa' - implementation 'com.amazonaws.serverless:aws-serverless-java-container-springboot2:1.8.1' testImplementation(testFixtures(project(':paimonganyu-domain'))) testImplementation('org.springframework.boot:spring-boot-starter-test') { diff --git a/PaimonGanyu/paimonganyu-app/paimonganyu-skill/samconfig.toml b/PaimonGanyu/paimonganyu-app/paimonganyu-skill/samconfig.toml index 5cff7dcc..ce2d3584 100644 --- a/PaimonGanyu/paimonganyu-app/paimonganyu-skill/samconfig.toml +++ b/PaimonGanyu/paimonganyu-app/paimonganyu-skill/samconfig.toml @@ -3,11 +3,11 @@ version = 0.1 [default.deploy] [default.deploy.parameters] stack_name = "paimonganyu-skill" -s3_bucket = "aws-sam-cli-managed-default-samclisourcebucket-3t80l0g3f3ma" +s3_bucket = "aws-sam-cli-managed-default-samclisourcebucket-idkhpdkh78w2" s3_prefix = "paimonganyu-skill" region = "ap-northeast-2" -profile = "pgprod" +profile = "pgtest" capabilities = "CAPABILITY_IAM" -parameter_overrides = "Env=\"prod\" UseALB=\"False\"" +parameter_overrides = "Env=\"test\" UseALB=\"False\"" image_repositories = [] disable_rollback = true diff --git a/PaimonGanyu/paimonganyu-app/paimonganyu-skill/src/main/java/org/binchoo/paimonganyu/chatbot/PaimonGanyuLambda.java b/PaimonGanyu/paimonganyu-app/paimonganyu-skill/src/main/java/org/binchoo/paimonganyu/chatbot/PaimonGanyuLambda.java deleted file mode 100644 index 1be7220c..00000000 --- a/PaimonGanyu/paimonganyu-app/paimonganyu-skill/src/main/java/org/binchoo/paimonganyu/chatbot/PaimonGanyuLambda.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.binchoo.paimonganyu.chatbot; - -import com.amazonaws.serverless.exceptions.ContainerInitializationException; -import com.amazonaws.serverless.proxy.model.AwsProxyRequest; -import com.amazonaws.serverless.proxy.model.AwsProxyResponse; -import com.amazonaws.serverless.proxy.spring.SpringBootLambdaContainerHandler; -import com.amazonaws.serverless.proxy.spring.SpringBootProxyHandlerBuilder; -import com.amazonaws.services.lambda.runtime.Context; -import com.amazonaws.services.lambda.runtime.RequestStreamHandler; -import lombok.extern.slf4j.Slf4j; - -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; - -/** - * @author jbinchoo - * @since 2022/06/12 - */ -@Deprecated(forRemoval = true) -@Slf4j -public class PaimonGanyuLambda implements RequestStreamHandler { - - private static final String PROFILE = System.getenv("PROFILE"); - - private final SpringBootLambdaContainerHandler handler; - - public PaimonGanyuLambda() throws ContainerInitializationException { - handler = new SpringBootProxyHandlerBuilder() - .defaultProxy() - .asyncInit() - .profiles(PROFILE) - .springBootApplication(PaimonGanyu.class) - .buildAndInitialize(); - } - - @Override - public void handleRequest(InputStream input, OutputStream output, Context context) throws IOException { - handler.proxyStream(input, output, context); - } -} diff --git a/PaimonGanyu/paimonganyu-app/paimonganyu-skill/src/test/java/org/binchoo/paimonganyu/chatbot/PaimonGanyuLambdaTest.java b/PaimonGanyu/paimonganyu-app/paimonganyu-skill/src/test/java/org/binchoo/paimonganyu/chatbot/PaimonGanyuLambdaTest.java deleted file mode 100644 index ade470c6..00000000 --- a/PaimonGanyu/paimonganyu-app/paimonganyu-skill/src/test/java/org/binchoo/paimonganyu/chatbot/PaimonGanyuLambdaTest.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.binchoo.paimonganyu.chatbot; - -import com.amazonaws.serverless.exceptions.ContainerInitializationException; -import com.amazonaws.serverless.proxy.model.AwsProxyRequest; -import com.amazonaws.serverless.proxy.spring.SpringBootProxyHandlerBuilder; -import org.junit.jupiter.api.Test; - -/** - * @author jbinchoo - * @since 2022/06/12 - */ -class PaimonGanyuLambdaTest { - - @Test - void bootstreap() throws ContainerInitializationException { - var handler = new SpringBootProxyHandlerBuilder() - .defaultProxy() - .asyncInit() - .profiles("test") - .springBootApplication(PaimonGanyu.class) - .buildAndInitialize(); - } -} \ No newline at end of file