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

Deploy Support for AWS Amplify #986

Open
tylersayshi opened this issue Nov 2, 2024 · 9 comments
Open

Deploy Support for AWS Amplify #986

tylersayshi opened this issue Nov 2, 2024 · 9 comments

Comments

@tylersayshi
Copy link
Contributor

A vite plugin is necessary to configure the build process to build for AWS Amplify.

It would be nice to include docs similar to: https://github.com/dai-shi/waku/blob/main/docs/builder/aws-lambda.mdx#L1-L4 for amplify

Also, it could be interesting to investigate nitro for adding this support.

@dai-shi
Copy link
Owner

dai-shi commented Nov 5, 2024

@rmarscher @pmelab thoughts?

@dai-shi
Copy link
Owner

dai-shi commented Nov 5, 2024

nitro for adding this support.

Is it related to AWS Amplify?

@pmelab
Copy link
Contributor

pmelab commented Nov 5, 2024

@rmarscher @pmelab thoughts?

Is there a reason you tagged me? Unfortunately I don't have experience with AWS Amplify.

@dai-shi
Copy link
Owner

dai-shi commented Nov 5, 2024

Is there a reason you tagged me?

I thought you are familiar with AWS Lambda deployment, and I didn't know if there was a difference between Amplify and Lambda. Sorry about that.

Wait, I was completely wrong. I should have tagged @aheissenberger instead.

@pmelab
Copy link
Contributor

pmelab commented Nov 5, 2024

Wait, I was completely wrong. I should have tagged @aheissenberger instead.

😂 I suspected something like that.

@rmarscher
Copy link
Contributor

A vite plugin is necessary to configure the build process to build for AWS Amplify.

@tylersayshi Do you have a link to the docs for using Vite with AWS Amplify?

@tylersayshi
Copy link
Contributor Author

@rmarscher do you mean just deploying any vite app at all to aws amplify?

I don't really have any details on this beyond the initial ask though. I made this issue in response to a user asking for aws amplify support in the waku discord channel.

@rmarscher
Copy link
Contributor

@rmarscher do you mean just deploying any vite app at all to aws amplify?

I don't really have any details on this beyond the initial ask though. I made this issue in response to a user asking for aws amplify support in the waku discord channel.

Yeah, sorry. I found the context on Discord. I thought you meant that Amplify requires using a specific Vite plugin when deploying to it.

The Nitro presets are a pretty good reference for where the static and function assets need to be moved to for deploying to AWS amplify - https://github.com/nitrojs/nitro/blob/v2/src/presets/aws-amplify/preset.ts
https://nitro.build/deploy/providers/aws-amplify
I think we agreed to do our own thing for now and not try to incorporate Nitro's presets/config into our build system since it seems to be coupled with the rest of their ecosystem.

I am finding that a lot of deploy scenarios require a separate "function" folder with the server code from the public assets folder. A manifest of the public asset files is also often necessary.

I'm personally a bit confused on the correct cache headers for some of the files - especially the dist/public/RSC files. It seems like there are a few urls that do not update when the content changes on deploy. So I think those need to have no-cache headers or have their cache invalidated on deploy or something like that. Cloudfront cache invalidations are actually pretty expensive if you do them a lot.

I don't personally have a use case for Amplify so I can't volunteer to take on supporting a deploy plugin. I'm happily using SST for now.

@tylersayshi
Copy link
Contributor Author

Seems safe for this issue to wait for a stronger use case to develop itself - would be a nice option if someone is new to waku and wanting to use amplify I think. Or would be nice to see 👍's on the issue description to see that this is something many people would use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants