Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/fix error localhost #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions TestAwsLambdaAuthorizer/build-and-deploy.sh
@@ -0,0 +1,4 @@
#!/usr/bin/env bash

mvn clean install
sls deploy -v
10 changes: 0 additions & 10 deletions TestAwsLambdaAuthorizer/pom.xml
Expand Up @@ -27,17 +27,10 @@
<artifactId>spring-cloud-function-context</artifactId>
<version>2.1.0.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-function-core</artifactId>
<version>2.1.0.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-function-adapter-aws</artifactId>
<version>2.1.0.RELEASE</version>
</dependency>

<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-lambda-java-events</artifactId>
Expand All @@ -53,7 +46,6 @@
<artifactId>commons-lang3</artifactId>
<version>3.9</version>
</dependency>

<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-function-webflux</artifactId>
Expand All @@ -64,8 +56,6 @@
<artifactId>spring-cloud-function-web</artifactId>
<version>2.1.0.RELEASE</version>
</dependency>


<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
Expand Down
17 changes: 17 additions & 0 deletions TestAwsLambdaAuthorizer/serverless.yml
@@ -0,0 +1,17 @@
service: spring-cloud-function-authorizer
provider:
name: aws
runtime: java8
region: eu-west-1
timeout: 20
package:
artifact: target/TestAwsLambdaAuthorizer-0.0.1-SNAPSHOT-aws.jar
functions:
awsAuthorizer:
name: aws-lambda-authorizer
handler: com.test.TestAwsLambdaAuthorizer.eventHandler.AuthorizerEventHandler
events:
- http:
path: authorize
method: get
cors: true
Expand Up @@ -19,25 +19,17 @@
import com.test.TestAwsLambdaAuthorizer.cloudFunction.TestFunction;
import com.test.TestAwsLambdaAuthorizer.model.AuthPolicy;

/*@Import({
AuthorizerFunction.class
})

@SpringBootApplication*/
@SpringBootConfiguration
public class TestAwsLambdaAuthorizerApplication implements ApplicationContextInitializer<GenericApplicationContext> {

public static void main(String[] args) {
FunctionalSpringApplication.run(TestAwsLambdaAuthorizerApplication.class, args);
//SpringApplication.run(TestAwsLambdaAuthorizerApplication.class, args);
}

//@Bean
public AuthorizerFunction authorizer() {
return new AuthorizerFunction();
}

//@Bean
public TestFunction testFunction() {
return new TestFunction();
}
Expand Down
@@ -1 +1,2 @@

function.name=authorizer
spring.cloud.function.scan.packages=com.test.TestAwsLambdaAuthorizer