Skip to content

Application load balancer #131

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

Merged
merged 4 commits into from
May 19, 2020
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions aws-lambda-java-events/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* `APIGatewayProxyResponseEvent`
* `APIGatewayV2ProxyRequestEvent`
* `APIGatewayV2ProxyResponseEvent`
* `ApplicationLoadBalancerRequestEvent`
* `ApplicationLoadBalancerResponseEvent`
* `CloudFrontEvent`
* `CloudWatchLogsEvent`
* `CodeCommitEvent`
Expand Down
6 changes: 6 additions & 0 deletions aws-lambda-java-events/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@
<version>5.5.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.12</version>
<scope>provided</scope>
</dependency>
</dependencies>

<profiles>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
package com.amazonaws.services.lambda.runtime.events;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Map;

/**
* Class to represent the request event from Application Load Balancer.
*
* @see <a href="https://docs.aws.amazon.com/lambda/latest/dg/services-alb.html">Using AWS Lambda with an Application Load Balancer</a>
*
* @author msailes <[email protected]>
*/

@NoArgsConstructor
@Data
public class ApplicationLoadBalancerRequestEvent implements Serializable, Cloneable {

@NoArgsConstructor
@Data
public class Elb implements Serializable, Cloneable {

private String targetGroupArn;

}

@NoArgsConstructor
@Data
public class RequestContext implements Serializable, Cloneable {

private Elb elb;

}

private RequestContext requestContext;
private String httpMethod;
private String path;
private Map<String, String> queryStringParameters;
private Map<String, String> headers;
private String body;
private boolean isBase64Encoded;

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package com.amazonaws.services.lambda.runtime.events;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Map;

/**
* Class to represent the response event to Application Load Balancer.
*
* @see <a href="https://docs.aws.amazon.com/lambda/latest/dg/services-alb.html">Using AWS Lambda with an Application Load Balancer</a>
*
* @author msailes <[email protected]>
*/

@NoArgsConstructor
@Data
public class ApplicationLoadBalancerResponseEvent implements Serializable, Cloneable {

private int statusCode;
private String statusDescription;
private boolean isBase64Encoded;
private Map<String, String> headers;
private String body;

}