SvelteKit Adapter AWS
This project contains a SvelteKit adapter to deploy SvelteKit to AWS using AWS-CDK.
How to use?
- Create a SvelteKit project "my-app" -
npm create svelte@latest my-app
cd my-app
npm install
npm install -D sveltekit-adapter-aws
- edit svelte.config.js
Basic setup example
svelte.config.js
import { adapter } from 'sveltekit-adapter-aws';
import preprocess from 'svelte-preprocess';
export default {
preprocess: preprocess(),
kit: {
adapter: adapter({
autoDeploy: true,
}),
},
};
Architecture
Configuration
export interface AWSAdapterProps {
cdkProjectPath?: string;
artifactPath?: string;
autoDeploy?: boolean;
stackName?: string;
esbuildOptions?: any;
FQDN?: string;
MEMORY_SIZE?: number;
LOG_RETENTION_DAYS?: number;
}
Example usages