Skip to content

gzimbron/amplify-adapter

Repository files navigation

amplify-adapter

Adapter for SvelteKit apps to Amplify Host CI/CD.

Este paquete se creó para adaptar el paquete @sveltejs/node-adapter para su uso con CI/CD en AWS Amplify + SSR. Este paquete incluye los siguientes cambios:

Limitations:

  • Artifacts size limit: 200 MB

Video tutorial

SvelteKit + Amplify CI/CD

Usage

  • Install with npm or yarn:
npm install --save-dev amplify-adapter
  • Add the adapter to your svelte.config.js:
// svelte.config.js
import adapter from 'amplify-adapter';

Amplify CI/CD

  • Connect a branch to your Amplify App Hosting for CI/CD (setup default values).

Connect branch

  • Go to App settings > Build settings > App build specification and set Artifact folder to build (default adapter output folder) and add this lines to frontend -> build phase:
- cd build/compute/default/
- npm i --production

App build specification

  • At App settings > Build settings > Build image settings clic Edit Button, and change Build image to Amazon Linux:2023.

Build image settings

Build image settings

License

MIT