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

AWS Lambda ALB Support #3457

Closed
parisholley opened this issue Jun 12, 2022 · 3 comments
Closed

AWS Lambda ALB Support #3457

parisholley opened this issue Jun 12, 2022 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@parisholley
Copy link

parisholley commented Jun 12, 2022

What version of Remix are you using?

1.4.0

Steps to Reproduce

follow standard architect adapter settings

Expected Behavior

works

Actual Behavior

doesn't :)

this is what I am doing to work around:

const {createRequestHandler} = require("@remix-run/architect");
const node = require("@remix-run/node");
const qs = require('querystring');

const handler = createRequestHandler({
  build: require("./build/remix.js"),
});

exports.handler = async (event) => {
  const response = await remixHandler({
    ...event,
    body: event.httpMethod === 'POST' ? event.body : null,
    rawPath: event.path,
    rawQueryString: qs.stringify(event.queryStringParameters, '&', '=', {encodeURIComponent: (s) => s}),
    requestContext: {
      http: {
        method: event.httpMethod
      }
    }
  });

  if (response.cookies.length) {
    response['headers']['Set-cookie'] = response.cookies[0];
  }

  return response;
};
@machour
Copy link
Collaborator

machour commented Jun 15, 2022

Could you describe what's not working? Is there an error when you run the app? What is it?

@machour machour added the needs-response We need a response from the original author about this issue/PR label Jun 15, 2022
@parisholley
Copy link
Author

the request payload on ALB vs Gateway is not the same, my code above is what I am using to transform it. the errors are a bunch of invalid object access (undefined/null, etc)

@MichaelDeBoey MichaelDeBoey added bug Something isn't working adapter:architect and removed needs-response We need a response from the original author about this issue/PR bug:unverified labels Jul 6, 2022
@brophdawg11 brophdawg11 added this to v2 Aug 3, 2023
@brophdawg11 brophdawg11 moved this to Backlog in v2 Aug 3, 2023
@ryanflorence
Copy link
Member

I believe this would require a new adapter, we're already stretched to thin as a team on maintaining adapters, but anybody can create one!

@MichaelDeBoey MichaelDeBoey moved this from Backlog to Closed in v2 Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Status: Closed
Development

No branches or pull requests

4 participants