New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@astro-aws/constructs

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@astro-aws/constructs

Constructs for deploying an Astro application to AWS Lambda

latest
Source
npmnpm
Version
0.13.0
Version published
Weekly downloads
85
-27.97%
Maintainers
1
Weekly downloads
 
Created
Source

@astro-aws/constructs

Constructs for deploying your Astro project that is built using @astro-aws/adapter.

Usage

  • Install this package and it's peer dependencies in your AWS CDK project.
# Using NPM
npm install @astro-aws/constructs constructs aws-cdk-lib

# Using Yarn
yarn add @astro-aws/constructs constructs aws-cdk-lib

# Using PNPM
pnpm add @astro-aws/constructs constructs aws-cdk-lib

# Using Bun
bun add @astro-aws/constructs constructs aws-cdk-lib
  • Add the construct to your CDK stack.
import { Stack } from "aws-cdk-lib/core"
import type { StackProps } from "aws-cdk-lib/core"
import { AstroAWS } from "@astro-aws/constructs"

export interface AstroSiteStackProps extends StackProps {}

export class AstroSiteStack extends Stack {
	public constructor(scope: Construct, id: string, props: AstroSiteStackProps) {
		super(scope, id, props)

		new AstroAWS(this, "AstroAWS", {
			websitePath: "..", // Replace with the path to your website code.
		})
	}
}

Customization

All the resources created by the AstroAWS construct can be customized. We expose every prop of the resources that is customizable. The props can be set by passing them in to the cdk field on the AstroAWS construct props. Depending on the deployment method, not all of the props will be used. The constructed can be access through the cdk field on the AstroAWS construct object.

import { Stack, CfnOutput } from "aws-cdk-lib/core"
import type { StackProps } from "aws-cdk-lib/core"
import { AstroAWS } from "@astro-aws/constructs"

export interface AstroSiteStackProps extends StackProps {}

export class AstroSiteStack extends Stack {
	public constructor(scope: Construct, id: string, props: AstroSiteStackProps) {
		super(scope, id, props)

		const astroAWS = new AstroAWS(this, "AstroAWS", {
			cdk: {
				lambdaFunction: {
					memorySize: 1024,
				},
			},
			websitePath: "..", // Replace with the path to your website code.
		})

		new CfnOutput(this, "DistributionDomainName", {
			value: astroAWS.cdk.cloudfrontDistribution.distributionDomainName,
		})
	}
}

Example

See the source code of this site

Keywords

withastro

FAQs

Package last updated on 05 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts