Documentation ¶
Overview ¶
Deploy a NextJS app using OpenNext packaging to serverless AWS using CDK
Index ¶
- func ImageOptimizationLambda_ClassifyVersionProperty(propertyName *string, locked *bool)
- func ImageOptimizationLambda_FromFunctionArn(scope constructs.Construct, id *string, functionArn *string) awslambda.IFunction
- func ImageOptimizationLambda_FromFunctionAttributes(scope constructs.Construct, id *string, attrs *awslambda.FunctionAttributes) awslambda.IFunction
- func ImageOptimizationLambda_FromFunctionName(scope constructs.Construct, id *string, functionName *string) awslambda.IFunction
- func ImageOptimizationLambda_IsConstruct(x interface{}) *bool
- func ImageOptimizationLambda_IsOwnedResource(construct constructs.IConstruct) *bool
- func ImageOptimizationLambda_IsResource(construct constructs.IConstruct) *bool
- func ImageOptimizationLambda_MetricAll(metricName *string, props *awscloudwatch.MetricOptions) awscloudwatch.Metric
- func ImageOptimizationLambda_MetricAllConcurrentExecutions(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
- func ImageOptimizationLambda_MetricAllDuration(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
- func ImageOptimizationLambda_MetricAllErrors(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
- func ImageOptimizationLambda_MetricAllInvocations(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
- func ImageOptimizationLambda_MetricAllThrottles(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
- func ImageOptimizationLambda_MetricAllUnreservedConcurrentExecutions(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
- func NewImageOptimizationLambda_Override(i ImageOptimizationLambda, scope constructs.Construct, id *string, ...)
- func NewNextJsAssetsDeployment_Override(n NextJsAssetsDeployment, scope constructs.Construct, id *string, ...)
- func NewNextJsLambda_Override(n NextJsLambda, scope constructs.Construct, id *string, ...)
- func NewNextjsBuild_Override(n NextjsBuild, scope constructs.Construct, id *string, props *NextjsBuildProps)
- func NewNextjsDistribution_Override(n NextjsDistribution, scope constructs.Construct, id *string, ...)
- func NewNextjsLayer_Override(n NextjsLayer, scope constructs.Construct, id *string, props *NextjsLayerProps)
- func NewNextjsS3EnvRewriter_Override(n NextjsS3EnvRewriter, scope constructs.Construct, id *string, ...)
- func NewNextjs_Override(n Nextjs, scope constructs.Construct, id *string, props *NextjsProps)
- func NextJsAssetsDeployment_IsConstruct(x interface{}) *bool
- func NextJsLambda_IsConstruct(x interface{}) *bool
- func NextjsBuild_IsConstruct(x interface{}) *bool
- func NextjsDistribution_FallbackOriginRequestPolicyProps() *awscloudfront.OriginRequestPolicyProps
- func NextjsDistribution_ImageCachePolicyProps() *awscloudfront.CachePolicyProps
- func NextjsDistribution_ImageOptimizationOriginRequestPolicyProps() *awscloudfront.OriginRequestPolicyProps
- func NextjsDistribution_IsConstruct(x interface{}) *bool
- func NextjsDistribution_LambdaCachePolicyProps() *awscloudfront.CachePolicyProps
- func NextjsDistribution_LambdaOriginRequestPolicyProps() *awscloudfront.OriginRequestPolicyProps
- func NextjsDistribution_SetFallbackOriginRequestPolicyProps(val *awscloudfront.OriginRequestPolicyProps)
- func NextjsDistribution_SetImageCachePolicyProps(val *awscloudfront.CachePolicyProps)
- func NextjsDistribution_SetImageOptimizationOriginRequestPolicyProps(val *awscloudfront.OriginRequestPolicyProps)
- func NextjsDistribution_SetLambdaCachePolicyProps(val *awscloudfront.CachePolicyProps)
- func NextjsDistribution_SetLambdaOriginRequestPolicyProps(val *awscloudfront.OriginRequestPolicyProps)
- func NextjsDistribution_SetStaticCachePolicyProps(val *awscloudfront.CachePolicyProps)
- func NextjsDistribution_StaticCachePolicyProps() *awscloudfront.CachePolicyProps
- func NextjsLayer_FromLayerVersionArn(scope constructs.Construct, id *string, layerVersionArn *string) awslambda.ILayerVersion
- func NextjsLayer_FromLayerVersionAttributes(scope constructs.Construct, id *string, ...) awslambda.ILayerVersion
- func NextjsLayer_IsConstruct(x interface{}) *bool
- func NextjsLayer_IsOwnedResource(construct constructs.IConstruct) *bool
- func NextjsLayer_IsResource(construct constructs.IConstruct) *bool
- func NextjsS3EnvRewriter_IsConstruct(x interface{}) *bool
- func Nextjs_IsConstruct(x interface{}) *bool
- type BaseSiteDomainProps
- type BaseSiteEnvironmentOutputsInfo
- type BaseSiteReplaceProps
- type CreateArchiveArgs
- type ImageOptimizationLambda
- type ImageOptimizationProps
- type NextJsAssetsDeployment
- type NextJsLambda
- type Nextjs
- type NextjsAssetsCachePolicyProps
- type NextjsAssetsDeploymentProps
- type NextjsAssetsDeploymentPropsDefaults
- type NextjsBaseProps
- type NextjsBuild
- type NextjsBuildProps
- type NextjsCachePolicyProps
- type NextjsDefaultsProps
- type NextjsDistribution
- type NextjsDistributionCdkProps
- type NextjsDistributionProps
- type NextjsDistributionPropsDefaults
- type NextjsDomainProps
- type NextjsLambdaProps
- type NextjsLayer
- type NextjsLayerProps
- type NextjsOriginRequestPolicyProps
- type NextjsProps
- type NextjsS3EnvRewriter
- type NextjsS3EnvRewriterProps
- type RewriteReplacementsConfig
- type RewriterParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ImageOptimizationLambda_ClassifyVersionProperty ¶
Record whether specific properties in the `AWS::Lambda::Function` resource should also be associated to the Version resource.
See 'currentVersion' section in the module README for more details.
func ImageOptimizationLambda_FromFunctionArn ¶
func ImageOptimizationLambda_FromFunctionArn(scope constructs.Construct, id *string, functionArn *string) awslambda.IFunction
Import a lambda function into the CDK using its ARN.
func ImageOptimizationLambda_FromFunctionAttributes ¶
func ImageOptimizationLambda_FromFunctionAttributes(scope constructs.Construct, id *string, attrs *awslambda.FunctionAttributes) awslambda.IFunction
Creates a Lambda function object which represents a function not defined within this stack.
func ImageOptimizationLambda_FromFunctionName ¶
func ImageOptimizationLambda_FromFunctionName(scope constructs.Construct, id *string, functionName *string) awslambda.IFunction
Import a lambda function into the CDK using its name.
func ImageOptimizationLambda_IsConstruct ¶
func ImageOptimizationLambda_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead.
func ImageOptimizationLambda_IsOwnedResource ¶
func ImageOptimizationLambda_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise.
func ImageOptimizationLambda_IsResource ¶
func ImageOptimizationLambda_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource.
func ImageOptimizationLambda_MetricAll ¶
func ImageOptimizationLambda_MetricAll(metricName *string, props *awscloudwatch.MetricOptions) awscloudwatch.Metric
Return the given named metric for this Lambda.
func ImageOptimizationLambda_MetricAllConcurrentExecutions ¶
func ImageOptimizationLambda_MetricAllConcurrentExecutions(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
Metric for the number of concurrent executions across all Lambdas. Default: max over 5 minutes.
func ImageOptimizationLambda_MetricAllDuration ¶
func ImageOptimizationLambda_MetricAllDuration(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
Metric for the Duration executing all Lambdas. Default: average over 5 minutes.
func ImageOptimizationLambda_MetricAllErrors ¶
func ImageOptimizationLambda_MetricAllErrors(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
Metric for the number of Errors executing all Lambdas. Default: sum over 5 minutes.
func ImageOptimizationLambda_MetricAllInvocations ¶
func ImageOptimizationLambda_MetricAllInvocations(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
Metric for the number of invocations of all Lambdas. Default: sum over 5 minutes.
func ImageOptimizationLambda_MetricAllThrottles ¶
func ImageOptimizationLambda_MetricAllThrottles(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
Metric for the number of throttled invocations of all Lambdas. Default: sum over 5 minutes.
func ImageOptimizationLambda_MetricAllUnreservedConcurrentExecutions ¶
func ImageOptimizationLambda_MetricAllUnreservedConcurrentExecutions(props *awscloudwatch.MetricOptions) awscloudwatch.Metric
Metric for the number of unreserved concurrent executions across all Lambdas. Default: max over 5 minutes.
func NewImageOptimizationLambda_Override ¶
func NewImageOptimizationLambda_Override(i ImageOptimizationLambda, scope constructs.Construct, id *string, props *ImageOptimizationProps)
func NewNextJsAssetsDeployment_Override ¶
func NewNextJsAssetsDeployment_Override(n NextJsAssetsDeployment, scope constructs.Construct, id *string, props *NextjsAssetsDeploymentProps)
func NewNextJsLambda_Override ¶
func NewNextJsLambda_Override(n NextJsLambda, scope constructs.Construct, id *string, props *NextjsLambdaProps)
func NewNextjsBuild_Override ¶
func NewNextjsBuild_Override(n NextjsBuild, scope constructs.Construct, id *string, props *NextjsBuildProps)
func NewNextjsDistribution_Override ¶
func NewNextjsDistribution_Override(n NextjsDistribution, scope constructs.Construct, id *string, props *NextjsDistributionProps)
func NewNextjsLayer_Override ¶
func NewNextjsLayer_Override(n NextjsLayer, scope constructs.Construct, id *string, props *NextjsLayerProps)
func NewNextjsS3EnvRewriter_Override ¶
func NewNextjsS3EnvRewriter_Override(n NextjsS3EnvRewriter, scope constructs.Construct, id *string, props *NextjsS3EnvRewriterProps)
func NewNextjs_Override ¶
func NewNextjs_Override(n Nextjs, scope constructs.Construct, id *string, props *NextjsProps)
func NextJsAssetsDeployment_IsConstruct ¶
func NextJsAssetsDeployment_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead.
func NextJsLambda_IsConstruct ¶
func NextJsLambda_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead.
func NextjsBuild_IsConstruct ¶
func NextjsBuild_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead.
func NextjsDistribution_FallbackOriginRequestPolicyProps ¶
func NextjsDistribution_FallbackOriginRequestPolicyProps() *awscloudfront.OriginRequestPolicyProps
func NextjsDistribution_ImageCachePolicyProps ¶
func NextjsDistribution_ImageCachePolicyProps() *awscloudfront.CachePolicyProps
func NextjsDistribution_ImageOptimizationOriginRequestPolicyProps ¶
func NextjsDistribution_ImageOptimizationOriginRequestPolicyProps() *awscloudfront.OriginRequestPolicyProps
func NextjsDistribution_IsConstruct ¶
func NextjsDistribution_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead.
func NextjsDistribution_LambdaCachePolicyProps ¶
func NextjsDistribution_LambdaCachePolicyProps() *awscloudfront.CachePolicyProps
func NextjsDistribution_LambdaOriginRequestPolicyProps ¶
func NextjsDistribution_LambdaOriginRequestPolicyProps() *awscloudfront.OriginRequestPolicyProps
func NextjsDistribution_SetFallbackOriginRequestPolicyProps ¶
func NextjsDistribution_SetFallbackOriginRequestPolicyProps(val *awscloudfront.OriginRequestPolicyProps)
func NextjsDistribution_SetImageCachePolicyProps ¶
func NextjsDistribution_SetImageCachePolicyProps(val *awscloudfront.CachePolicyProps)
func NextjsDistribution_SetImageOptimizationOriginRequestPolicyProps ¶
func NextjsDistribution_SetImageOptimizationOriginRequestPolicyProps(val *awscloudfront.OriginRequestPolicyProps)
func NextjsDistribution_SetLambdaCachePolicyProps ¶
func NextjsDistribution_SetLambdaCachePolicyProps(val *awscloudfront.CachePolicyProps)
func NextjsDistribution_SetLambdaOriginRequestPolicyProps ¶
func NextjsDistribution_SetLambdaOriginRequestPolicyProps(val *awscloudfront.OriginRequestPolicyProps)
func NextjsDistribution_SetStaticCachePolicyProps ¶
func NextjsDistribution_SetStaticCachePolicyProps(val *awscloudfront.CachePolicyProps)
func NextjsDistribution_StaticCachePolicyProps ¶
func NextjsDistribution_StaticCachePolicyProps() *awscloudfront.CachePolicyProps
func NextjsLayer_FromLayerVersionArn ¶
func NextjsLayer_FromLayerVersionArn(scope constructs.Construct, id *string, layerVersionArn *string) awslambda.ILayerVersion
Imports a layer version by ARN.
Assumes it is compatible with all Lambda runtimes.
func NextjsLayer_FromLayerVersionAttributes ¶
func NextjsLayer_FromLayerVersionAttributes(scope constructs.Construct, id *string, attrs *awslambda.LayerVersionAttributes) awslambda.ILayerVersion
Imports a Layer that has been defined externally.
func NextjsLayer_IsConstruct ¶
func NextjsLayer_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead.
func NextjsLayer_IsOwnedResource ¶
func NextjsLayer_IsOwnedResource(construct constructs.IConstruct) *bool
Returns true if the construct was created by CDK, and false otherwise.
func NextjsLayer_IsResource ¶
func NextjsLayer_IsResource(construct constructs.IConstruct) *bool
Check whether the given construct is a Resource.
func NextjsS3EnvRewriter_IsConstruct ¶
func NextjsS3EnvRewriter_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead.
func Nextjs_IsConstruct ¶
func Nextjs_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead.
Types ¶
type BaseSiteDomainProps ¶
type BaseSiteDomainProps struct { // The domain to be assigned to the website URL (ie. domain.com). // // Supports domains that are hosted either on [Route 53](https://aws.amazon.com/route53/) or externally. DomainName *string `field:"required" json:"domainName" yaml:"domainName"` // Specify additional names that should route to the Cloudfront Distribution. AlternateNames *[]*string `field:"optional" json:"alternateNames" yaml:"alternateNames"` // Import the certificate for the domain. // // By default, SST will create a certificate with the domain name. The certificate will be created in the `us-east-1`(N. Virginia) region as required by AWS CloudFront. // // Set this option if you have an existing certificate in the `us-east-1` region in AWS Certificate Manager you want to use. Certificate awscertificatemanager.ICertificate `field:"optional" json:"certificate" yaml:"certificate"` // An alternative domain to be assigned to the website URL. // // Visitors to the alias will be redirected to the main domain. (ie. `www.domain.com`). // // Use this to create a `www.` version of your domain and redirect visitors to the root domain. DomainAlias *string `field:"optional" json:"domainAlias" yaml:"domainAlias"` // Import the underlying Route 53 hosted zone. HostedZone awsroute53.IHostedZone `field:"optional" json:"hostedZone" yaml:"hostedZone"` // Set this option if the domain is not hosted on Amazon Route 53. IsExternalDomain *bool `field:"optional" json:"isExternalDomain" yaml:"isExternalDomain"` }
type BaseSiteReplaceProps ¶
type CreateArchiveArgs ¶
type CreateArchiveArgs struct { Directory *string `field:"required" json:"directory" yaml:"directory"` ZipFileName *string `field:"required" json:"zipFileName" yaml:"zipFileName"` ZipOutDir *string `field:"required" json:"zipOutDir" yaml:"zipOutDir"` CompressionLevel *float64 `field:"optional" json:"compressionLevel" yaml:"compressionLevel"` FileGlob *string `field:"optional" json:"fileGlob" yaml:"fileGlob"` Quiet *bool `field:"optional" json:"quiet" yaml:"quiet"` }
type ImageOptimizationLambda ¶
type ImageOptimizationLambda interface { awslambda.Function // The architecture of this Lambda Function (this is an optional attribute and defaults to X86_64). Architecture() awslambda.Architecture Bucket() awss3.IBucket SetBucket(val awss3.IBucket) // Whether the addPermission() call adds any permissions. // // True for new Lambdas, false for version $LATEST and imported Lambdas // from different accounts. CanCreatePermissions() *bool // Access the Connections object. // // Will fail if not a VPC-enabled Lambda Function. Connections() awsec2.Connections // Returns a `lambda.Version` which represents the current version of this Lambda function. A new version will be created every time the function's configuration changes. // // You can specify options for this version using the `currentVersionOptions` // prop when initializing the `lambda.Function`. CurrentVersion() awslambda.Version // The DLQ (as queue) associated with this Lambda Function (this is an optional attribute). DeadLetterQueue() awssqs.IQueue // The DLQ (as topic) associated with this Lambda Function (this is an optional attribute). DeadLetterTopic() awssns.ITopic // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. Env() *awscdk.ResourceEnvironment // ARN of this function. FunctionArn() *string // Name of this function. FunctionName() *string // The principal this Lambda Function is running as. GrantPrincipal() awsiam.IPrincipal // Whether or not this Lambda function was bound to a VPC. // // If this is is `false`, trying to access the `connections` object will fail. IsBoundToVpc() *bool // The `$LATEST` version of this function. // // Note that this is reference to a non-specific AWS Lambda version, which // means the function this version refers to can return different results in // different invocations. // // To obtain a reference to an explicit version which references the current // function configuration, use `lambdaFunction.currentVersion` instead. LatestVersion() awslambda.IVersion // The LogGroup where the Lambda function's logs are made available. // // If either `logRetention` is set or this property is called, a CloudFormation custom resource is added to the stack that // pre-creates the log group as part of the stack deployment, if it already doesn't exist, and sets the correct log retention // period (never expire, by default). // // Further, if the log group already exists and the `logRetention` is not set, the custom resource will reset the log retention // to never expire even if it was configured with a different value. LogGroup() awslogs.ILogGroup // The tree node. Node() constructs.Node // The construct node where permissions are attached. PermissionsNode() constructs.Node // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. PhysicalName() *string // The ARN(s) to put into the resource field of the generated IAM policy for grantInvoke(). ResourceArnsForGrantInvoke() *[]*string // Execution role associated with this function. Role() awsiam.IRole // The runtime configured for this lambda. Runtime() awslambda.Runtime // The stack in which this resource is defined. Stack() awscdk.Stack // The timeout configured for this lambda. Timeout() awscdk.Duration // Defines an alias for this function. // // The alias will automatically be updated to point to the latest version of // the function as it is being updated during a deployment. // // “`ts // declare const fn: lambda.Function; // // fn.addAlias('Live'); // // // Is equivalent to // // new lambda.Alias(this, 'AliasLive', { // aliasName: 'Live', // version: fn.currentVersion, // }); // “`. AddAlias(aliasName *string, options *awslambda.AliasOptions) awslambda.Alias // Adds an environment variable to this Lambda function. // // If this is a ref to a Lambda function, this operation results in a no-op. AddEnvironment(key *string, value *string, options *awslambda.EnvironmentOptions) awslambda.Function // Adds an event source to this function. // // Event sources are implemented in the aws-cdk-lib/aws-lambda-event-sources module. // // The following example adds an SQS Queue as an event source: // “` // import { SqsEventSource } from 'aws-cdk-lib/aws-lambda-event-sources'; // myFunction.addEventSource(new SqsEventSource(myQueue)); // “`. AddEventSource(source awslambda.IEventSource) // Adds an event source that maps to this AWS Lambda function. AddEventSourceMapping(id *string, options *awslambda.EventSourceMappingOptions) awslambda.EventSourceMapping // Adds a url to this lambda function. AddFunctionUrl(options *awslambda.FunctionUrlOptions) awslambda.FunctionUrl // Adds one or more Lambda Layers to this Lambda function. AddLayers(layers ...awslambda.ILayerVersion) // Adds a permission to the Lambda resource policy. // See: Permission for details. // AddPermission(id *string, permission *awslambda.Permission) // Adds a statement to the IAM role assumed by the instance. AddToRolePolicy(statement awsiam.PolicyStatement) // Apply the given removal policy to this resource. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). ApplyRemovalPolicy(policy awscdk.RemovalPolicy) // Configures options for asynchronous invocation. ConfigureAsyncInvoke(options *awslambda.EventInvokeConfigOptions) // A warning will be added to functions under the following conditions: - permissions that include `lambda:InvokeFunction` are added to the unqualified function. // // - function.currentVersion is invoked before or after the permission is created. // // This applies only to permissions on Lambda functions, not versions or aliases. // This function is overridden as a noOp for QualifiedFunctionBase. ConsiderWarningOnInvokeFunctionPermissions(scope constructs.Construct, action *string) GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. GetResourceNameAttribute(nameAttr *string) *string // Grant the given identity permissions to invoke this Lambda. GrantInvoke(grantee awsiam.IGrantable) awsiam.Grant // Grant multiple principals the ability to invoke this Lambda via CompositePrincipal. GrantInvokeCompositePrincipal(compositePrincipal awsiam.CompositePrincipal) *[]awsiam.Grant // Grant the given identity permissions to invoke this Lambda Function URL. GrantInvokeUrl(grantee awsiam.IGrantable) awsiam.Grant // Mix additional information into the hash of the Version object. // // The Lambda Function construct does its best to automatically create a new // Version when anything about the Function changes (its code, its layers, // any of the other properties). // // However, you can sometimes source information from places that the CDK cannot // look into, like the deploy-time values of SSM parameters. In those cases, // the CDK would not force the creation of a new Version object when it actually // should. // // This method can be used to invalidate the current Version object. Pass in // any string into this method, and make sure the string changes when you know // a new Version needs to be created. // // This method may be called more than once. InvalidateVersionBasedOn(x *string) // Return the given named metric for this Function. Metric(metricName *string, props *awscloudwatch.MetricOptions) awscloudwatch.Metric // How long execution of this Lambda takes. // // Average over 5 minutes. MetricDuration(props *awscloudwatch.MetricOptions) awscloudwatch.Metric // How many invocations of this Lambda fail. // // Sum over 5 minutes. MetricErrors(props *awscloudwatch.MetricOptions) awscloudwatch.Metric // How often this Lambda is invoked. // // Sum over 5 minutes. MetricInvocations(props *awscloudwatch.MetricOptions) awscloudwatch.Metric // How often this Lambda is throttled. // // Sum over 5 minutes. MetricThrottles(props *awscloudwatch.MetricOptions) awscloudwatch.Metric // Returns a string representation of this construct. ToString() *string WarnInvokeFunctionPermissions(scope constructs.Construct) }
This lambda handles image optimization.
func NewImageOptimizationLambda ¶
func NewImageOptimizationLambda(scope constructs.Construct, id *string, props *ImageOptimizationProps) ImageOptimizationLambda
type ImageOptimizationProps ¶
type ImageOptimizationProps struct { // Optional value used to install NextJS node dependencies. // // It defaults to 'npx --yes open-next@1 build'. BuildCommand *string `field:"optional" json:"buildCommand" yaml:"buildCommand"` // The directory to execute `npm run build` from. // // By default, it is `nextjsPath`. // Can be overridden, particularly useful for monorepos where `build` is expected to run // at the root of the project. BuildPath *string `field:"optional" json:"buildPath" yaml:"buildPath"` // 0 - no compression, fastest 9 - maximum compression, slowest. // Default: 1. // CompressionLevel *float64 `field:"optional" json:"compressionLevel" yaml:"compressionLevel"` // Custom environment variables to pass to the NextJS build and runtime. Environment *map[string]*string `field:"optional" json:"environment" yaml:"environment"` // Used in conjunction with nextJsPath to skip building NextJS app and assume .open-next folder already exists. Useful when using `next dev` for local development. // Deprecated: use `openNextPath` instead. IsPlaceholder *bool `field:"optional" json:"isPlaceholder" yaml:"isPlaceholder"` // Relative path to the directory where the NextJS project is located. // // Can be the root of your project (`.`) or a subdirectory (`packages/web`). // // One of `openNextPath`, `nextJsPath` or `nextjsPath` must be supplied. // Deprecated: use `nextJsPath` instead. NextjsPath *string `field:"optional" json:"nextjsPath" yaml:"nextjsPath"` // Relative path to the directory where the NextJS project is located. // // Can be the root of your project (`.`) or a subdirectory (`packages/web`). // // One of `openNextPath` or `nextJsPath` must be supplied. NextJsPath *string `field:"optional" json:"nextJsPath" yaml:"nextJsPath"` // Optional value for NODE_ENV during build and runtime. NodeEnv *string `field:"optional" json:"nodeEnv" yaml:"nodeEnv"` // Relative path to the OpenNext package named `.open-next` by default. // // One of `openNextPath` or `nextJsPath` must be supplied. OpenNextPath *string `field:"optional" json:"openNextPath" yaml:"openNextPath"` // Less build output. Quiet *bool `field:"optional" json:"quiet" yaml:"quiet"` // Optional arn for the sharp lambda layer. // // If omitted, the layer will be created. SharpLayerArn *string `field:"optional" json:"sharpLayerArn" yaml:"sharpLayerArn"` // Directory to store temporary build files in. // // Defaults to os.tmpdir(). TempBuildDir *string `field:"optional" json:"tempBuildDir" yaml:"tempBuildDir"` // The S3 bucket holding application images. Bucket awss3.IBucket `field:"required" json:"bucket" yaml:"bucket"` // The `NextjsBuild` instance representing the built Nextjs application. NextBuild NextjsBuild `field:"required" json:"nextBuild" yaml:"nextBuild"` // Override function properties. LambdaOptions *awslambda.FunctionOptions `field:"optional" json:"lambdaOptions" yaml:"lambdaOptions"` }
type NextJsAssetsDeployment ¶
type NextJsAssetsDeployment interface { constructs.Construct // Bucket containing assets. Bucket() awss3.IBucket SetBucket(val awss3.IBucket) // Asset deployments to S3. Deployments() *[]awss3deployment.BucketDeployment SetDeployments(val *[]awss3deployment.BucketDeployment) // The tree node. Node() constructs.Node Props() *NextjsAssetsDeploymentProps SetProps(val *NextjsAssetsDeploymentProps) Rewriter() NextjsS3EnvRewriter SetRewriter(val NextjsS3EnvRewriter) StaticTempDir() *string SetStaticTempDir(val *string) PrepareArchiveDirectory() *string // Returns a string representation of this construct. ToString() *string }
Uploads NextJS-built static and public files to S3.
Will rewrite CloudFormation references with their resolved values after uploading.
func NewNextJsAssetsDeployment ¶
func NewNextJsAssetsDeployment(scope constructs.Construct, id *string, props *NextjsAssetsDeploymentProps) NextJsAssetsDeployment
type NextJsLambda ¶
type NextJsLambda interface { constructs.Construct ConfigBucket() awss3.Bucket SetConfigBucket(val awss3.Bucket) LambdaFunction() awslambda.Function SetLambdaFunction(val awslambda.Function) // The tree node. Node() constructs.Node CreateConfigBucket(replacementParams *map[string]*string) *map[string]interface{} // Returns a string representation of this construct. ToString() *string }
Build a lambda function from a NextJS application to handle server-side rendering, API routes, and image optimization.
func NewNextJsLambda ¶
func NewNextJsLambda(scope constructs.Construct, id *string, props *NextjsLambdaProps) NextJsLambda
type Nextjs ¶
type Nextjs interface { constructs.Construct // Asset deployment to S3. AssetsDeployment() NextJsAssetsDeployment SetAssetsDeployment(val NextJsAssetsDeployment) Bucket() awss3.IBucket ConfigBucket() awss3.Bucket SetConfigBucket(val awss3.Bucket) // CloudFront distribution. Distribution() NextjsDistribution SetDistribution(val NextjsDistribution) // The image optimization handler lambda function. ImageOptimizationFunction() ImageOptimizationLambda SetImageOptimizationFunction(val ImageOptimizationLambda) ImageOptimizationLambdaFunctionUrl() awslambda.FunctionUrl SetImageOptimizationLambdaFunctionUrl(val awslambda.FunctionUrl) LambdaFunctionUrl() awslambda.FunctionUrl SetLambdaFunctionUrl(val awslambda.FunctionUrl) // Built NextJS project output. NextBuild() NextjsBuild SetNextBuild(val NextjsBuild) // The tree node. Node() constructs.Node Props() *NextjsProps SetProps(val *NextjsProps) // The main NextJS server handler lambda function. ServerFunction() NextJsLambda SetServerFunction(val NextJsLambda) StaticAssetBucket() awss3.IBucket SetStaticAssetBucket(val awss3.IBucket) // Where build-time assets for deployment are stored. TempBuildDir() *string SetTempBuildDir(val *string) Url() *string // Returns a string representation of this construct. ToString() *string }
The `Nextjs` construct is a higher level construct that makes it easy to create a NextJS app.
Your standalone server application will be bundled using o(utput tracing and will be deployed to a Lambda function. Static assets will be deployed to an S3 bucket and served via CloudFront. You must use Next.js 10.3.0 or newer.
Please provide a `nextjsPath` to the Next.js app inside your project.
Example:
new Nextjs(this, "Web", { nextjsPath: path.resolve("packages/web"), })
func NewNextjs ¶
func NewNextjs(scope constructs.Construct, id *string, props *NextjsProps) Nextjs
type NextjsAssetsCachePolicyProps ¶
type NextjsAssetsCachePolicyProps struct { // Cache-control max-age default for S3 static assets. // // Default: 30 days. StaticMaxAgeDefault awscdk.Duration `field:"optional" json:"staticMaxAgeDefault" yaml:"staticMaxAgeDefault"` // Cache-control stale-while-revalidate default for S3 static assets. // // Default: 1 day. StaticStaleWhileRevalidateDefault awscdk.Duration `field:"optional" json:"staticStaleWhileRevalidateDefault" yaml:"staticStaleWhileRevalidateDefault"` }
type NextjsAssetsDeploymentProps ¶
type NextjsAssetsDeploymentProps struct { // Optional value used to install NextJS node dependencies. // // It defaults to 'npx --yes open-next@1 build'. BuildCommand *string `field:"optional" json:"buildCommand" yaml:"buildCommand"` // The directory to execute `npm run build` from. // // By default, it is `nextjsPath`. // Can be overridden, particularly useful for monorepos where `build` is expected to run // at the root of the project. BuildPath *string `field:"optional" json:"buildPath" yaml:"buildPath"` // 0 - no compression, fastest 9 - maximum compression, slowest. // Default: 1. // CompressionLevel *float64 `field:"optional" json:"compressionLevel" yaml:"compressionLevel"` // Custom environment variables to pass to the NextJS build and runtime. Environment *map[string]*string `field:"optional" json:"environment" yaml:"environment"` // Used in conjunction with nextJsPath to skip building NextJS app and assume .open-next folder already exists. Useful when using `next dev` for local development. // Deprecated: use `openNextPath` instead. IsPlaceholder *bool `field:"optional" json:"isPlaceholder" yaml:"isPlaceholder"` // Relative path to the directory where the NextJS project is located. // // Can be the root of your project (`.`) or a subdirectory (`packages/web`). // // One of `openNextPath`, `nextJsPath` or `nextjsPath` must be supplied. // Deprecated: use `nextJsPath` instead. NextjsPath *string `field:"optional" json:"nextjsPath" yaml:"nextjsPath"` // Relative path to the directory where the NextJS project is located. // // Can be the root of your project (`.`) or a subdirectory (`packages/web`). // // One of `openNextPath` or `nextJsPath` must be supplied. NextJsPath *string `field:"optional" json:"nextJsPath" yaml:"nextJsPath"` // Optional value for NODE_ENV during build and runtime. NodeEnv *string `field:"optional" json:"nodeEnv" yaml:"nodeEnv"` // Relative path to the OpenNext package named `.open-next` by default. // // One of `openNextPath` or `nextJsPath` must be supplied. OpenNextPath *string `field:"optional" json:"openNextPath" yaml:"openNextPath"` // Less build output. Quiet *bool `field:"optional" json:"quiet" yaml:"quiet"` // Optional arn for the sharp lambda layer. // // If omitted, the layer will be created. SharpLayerArn *string `field:"optional" json:"sharpLayerArn" yaml:"sharpLayerArn"` // Directory to store temporary build files in. // // Defaults to os.tmpdir(). TempBuildDir *string `field:"optional" json:"tempBuildDir" yaml:"tempBuildDir"` // Properties for the S3 bucket containing the NextJS assets. Bucket awss3.IBucket `field:"required" json:"bucket" yaml:"bucket"` // The `NextjsBuild` instance representing the built Nextjs application. NextBuild NextjsBuild `field:"required" json:"nextBuild" yaml:"nextBuild"` // Override the default S3 cache policies created internally. CachePolicies *NextjsAssetsCachePolicyProps `field:"optional" json:"cachePolicies" yaml:"cachePolicies"` // Distribution to invalidate when assets change. Distribution awscloudfront.IDistribution `field:"optional" json:"distribution" yaml:"distribution"` // ephemeralStorageSize for lambda function which been run by BucketDeployment. EphemeralStorageSize awscdk.Size `field:"optional" json:"ephemeralStorageSize" yaml:"ephemeralStorageSize"` // memoryLimit for lambda function which been run by BucketDeployment. MemoryLimit *float64 `field:"optional" json:"memoryLimit" yaml:"memoryLimit"` // Set to true to delete old assets (defaults to false). // // Recommended to only set to true if you don't need the ability to roll back deployments. Prune *bool `field:"optional" json:"prune" yaml:"prune"` // In case of useEfs, vpc is required. UseEfs *bool `field:"optional" json:"useEfs" yaml:"useEfs"` // In case of useEfs, vpc is required. Vpc awsec2.IVpc `field:"optional" json:"vpc" yaml:"vpc"` }
type NextjsAssetsDeploymentPropsDefaults ¶ added in v0.0.5
type NextjsAssetsDeploymentPropsDefaults struct { // Optional value used to install NextJS node dependencies. // // It defaults to 'npx --yes open-next@1 build'. BuildCommand *string `field:"optional" json:"buildCommand" yaml:"buildCommand"` // The directory to execute `npm run build` from. // // By default, it is `nextjsPath`. // Can be overridden, particularly useful for monorepos where `build` is expected to run // at the root of the project. BuildPath *string `field:"optional" json:"buildPath" yaml:"buildPath"` // 0 - no compression, fastest 9 - maximum compression, slowest. // Default: 1. // CompressionLevel *float64 `field:"optional" json:"compressionLevel" yaml:"compressionLevel"` // Custom environment variables to pass to the NextJS build and runtime. Environment *map[string]*string `field:"optional" json:"environment" yaml:"environment"` // Used in conjunction with nextJsPath to skip building NextJS app and assume .open-next folder already exists. Useful when using `next dev` for local development. // Deprecated: use `openNextPath` instead. IsPlaceholder *bool `field:"optional" json:"isPlaceholder" yaml:"isPlaceholder"` // Relative path to the directory where the NextJS project is located. // // Can be the root of your project (`.`) or a subdirectory (`packages/web`). // // One of `openNextPath`, `nextJsPath` or `nextjsPath` must be supplied. // Deprecated: use `nextJsPath` instead. NextjsPath *string `field:"optional" json:"nextjsPath" yaml:"nextjsPath"` // Relative path to the directory where the NextJS project is located. // // Can be the root of your project (`.`) or a subdirectory (`packages/web`). // // One of `openNextPath` or `nextJsPath` must be supplied. NextJsPath *string `field:"optional" json:"nextJsPath" yaml:"nextJsPath"` // Optional value for NODE_ENV during build and runtime. NodeEnv *string `field:"optional" json:"nodeEnv" yaml:"nodeEnv"` // Relative path to the OpenNext package named `.open-next` by default. // // One of `openNextPath` or `nextJsPath` must be supplied. OpenNextPath *string `field:"optional" json:"openNextPath" yaml:"openNextPath"` // Less build output. Quiet *bool `field:"optional" json:"quiet" yaml:"quiet"` // Optional arn for the sharp lambda layer. // // If omitted, the layer will be created. SharpLayerArn *string `field:"optional" json:"sharpLayerArn" yaml:"sharpLayerArn"` // Directory to store temporary build files in. // // Defaults to os.tmpdir(). TempBuildDir *string `field:"optional" json:"tempBuildDir" yaml:"tempBuildDir"` // Properties for the S3 bucket containing the NextJS assets. Bucket awss3.IBucket `field:"optional" json:"bucket" yaml:"bucket"` // Override the default S3 cache policies created internally. CachePolicies *NextjsAssetsCachePolicyProps `field:"optional" json:"cachePolicies" yaml:"cachePolicies"` // Distribution to invalidate when assets change. Distribution awscloudfront.IDistribution `field:"optional" json:"distribution" yaml:"distribution"` // ephemeralStorageSize for lambda function which been run by BucketDeployment. EphemeralStorageSize awscdk.Size `field:"optional" json:"ephemeralStorageSize" yaml:"ephemeralStorageSize"` // memoryLimit for lambda function which been run by BucketDeployment. MemoryLimit *float64 `field:"optional" json:"memoryLimit" yaml:"memoryLimit"` // The `NextjsBuild` instance representing the built Nextjs application. NextBuild NextjsBuild `field:"optional" json:"nextBuild" yaml:"nextBuild"` // Set to true to delete old assets (defaults to false). // // Recommended to only set to true if you don't need the ability to roll back deployments. Prune *bool `field:"optional" json:"prune" yaml:"prune"` // In case of useEfs, vpc is required. UseEfs *bool `field:"optional" json:"useEfs" yaml:"useEfs"` // In case of useEfs, vpc is required. Vpc awsec2.IVpc `field:"optional" json:"vpc" yaml:"vpc"` }
Effectively a Partial<NextjsAssetsCachePolicyProps> to satisfy JSII.
type NextjsBaseProps ¶
type NextjsBaseProps struct { // Optional value used to install NextJS node dependencies. // // It defaults to 'npx --yes open-next@1 build'. BuildCommand *string `field:"optional" json:"buildCommand" yaml:"buildCommand"` // The directory to execute `npm run build` from. // // By default, it is `nextjsPath`. // Can be overridden, particularly useful for monorepos where `build` is expected to run // at the root of the project. BuildPath *string `field:"optional" json:"buildPath" yaml:"buildPath"` // 0 - no compression, fastest 9 - maximum compression, slowest. // Default: 1. // CompressionLevel *float64 `field:"optional" json:"compressionLevel" yaml:"compressionLevel"` // Custom environment variables to pass to the NextJS build and runtime. Environment *map[string]*string `field:"optional" json:"environment" yaml:"environment"` // Used in conjunction with nextJsPath to skip building NextJS app and assume .open-next folder already exists. Useful when using `next dev` for local development. // Deprecated: use `openNextPath` instead. IsPlaceholder *bool `field:"optional" json:"isPlaceholder" yaml:"isPlaceholder"` // Relative path to the directory where the NextJS project is located. // // Can be the root of your project (`.`) or a subdirectory (`packages/web`). // // One of `openNextPath`, `nextJsPath` or `nextjsPath` must be supplied. // Deprecated: use `nextJsPath` instead. NextjsPath *string `field:"optional" json:"nextjsPath" yaml:"nextjsPath"` // Relative path to the directory where the NextJS project is located. // // Can be the root of your project (`.`) or a subdirectory (`packages/web`). // // One of `openNextPath` or `nextJsPath` must be supplied. NextJsPath *string `field:"optional" json:"nextJsPath" yaml:"nextJsPath"` // Optional value for NODE_ENV during build and runtime. NodeEnv *string `field:"optional" json:"nodeEnv" yaml:"nodeEnv"` // Relative path to the OpenNext package named `.open-next` by default. // // One of `openNextPath` or `nextJsPath` must be supplied. OpenNextPath *string `field:"optional" json:"openNextPath" yaml:"openNextPath"` // Less build output. Quiet *bool `field:"optional" json:"quiet" yaml:"quiet"` // Optional arn for the sharp lambda layer. // // If omitted, the layer will be created. SharpLayerArn *string `field:"optional" json:"sharpLayerArn" yaml:"sharpLayerArn"` // Directory to store temporary build files in. // // Defaults to os.tmpdir(). TempBuildDir *string `field:"optional" json:"tempBuildDir" yaml:"tempBuildDir"` }
Common props shared across NextJS-related CDK constructs.
type NextjsBuild ¶
type NextjsBuild interface { constructs.Construct // Contains function for processessing image requests. // // Should be arm64. NextImageFnDir() *string SetNextImageFnDir(val *string) // Contains code for middleware. // // Not currently used. NextMiddlewareFnDir() *string SetNextMiddlewareFnDir(val *string) // Contains server code and dependencies. NextServerFnDir() *string SetNextServerFnDir(val *string) // Static files containing client-side code. NextStaticDir() *string SetNextStaticDir(val *string) // The tree node. Node() constructs.Node OpenNextPath() *string Props() *NextjsBuildProps SetProps(val *NextjsBuildProps) ReadPublicFileList() *[]*string // Returns a string representation of this construct. ToString() *string }
Represents a built NextJS application.
This construct runs `npm build` in standalone output mode inside your `nextjsPath`. This construct can be used by higher level constructs or used directly.
func NewNextjsBuild ¶
func NewNextjsBuild(scope constructs.Construct, id *string, props *NextjsBuildProps) NextjsBuild
type NextjsBuildProps ¶
type NextjsBuildProps struct { // Optional value used to install NextJS node dependencies. // // It defaults to 'npx --yes open-next@1 build'. BuildCommand *string `field:"optional" json:"buildCommand" yaml:"buildCommand"` // The directory to execute `npm run build` from. // // By default, it is `nextjsPath`. // Can be overridden, particularly useful for monorepos where `build` is expected to run // at the root of the project. BuildPath *string `field:"optional" json:"buildPath" yaml:"buildPath"` // 0 - no compression, fastest 9 - maximum compression, slowest. // Default: 1. // CompressionLevel *float64 `field:"optional" json:"compressionLevel" yaml:"compressionLevel"` // Custom environment variables to pass to the NextJS build and runtime. Environment *map[string]*string `field:"optional" json:"environment" yaml:"environment"` // Used in conjunction with nextJsPath to skip building NextJS app and assume .open-next folder already exists. Useful when using `next dev` for local development. // Deprecated: use `openNextPath` instead. IsPlaceholder *bool `field:"optional" json:"isPlaceholder" yaml:"isPlaceholder"` // Relative path to the directory where the NextJS project is located. // // Can be the root of your project (`.`) or a subdirectory (`packages/web`). // // One of `openNextPath`, `nextJsPath` or `nextjsPath` must be supplied. // Deprecated: use `nextJsPath` instead. NextjsPath *string `field:"optional" json:"nextjsPath" yaml:"nextjsPath"` // Relative path to the directory where the NextJS project is located. // // Can be the root of your project (`.`) or a subdirectory (`packages/web`). // // One of `openNextPath` or `nextJsPath` must be supplied. NextJsPath *string `field:"optional" json:"nextJsPath" yaml:"nextJsPath"` // Optional value for NODE_ENV during build and runtime. NodeEnv *string `field:"optional" json:"nodeEnv" yaml:"nodeEnv"` // Relative path to the OpenNext package named `.open-next` by default. // // One of `openNextPath` or `nextJsPath` must be supplied. OpenNextPath *string `field:"optional" json:"openNextPath" yaml:"openNextPath"` // Less build output. Quiet *bool `field:"optional" json:"quiet" yaml:"quiet"` // Optional arn for the sharp lambda layer. // // If omitted, the layer will be created. SharpLayerArn *string `field:"optional" json:"sharpLayerArn" yaml:"sharpLayerArn"` // Directory to store temporary build files in. // // Defaults to os.tmpdir(). TempBuildDir *string `field:"optional" json:"tempBuildDir" yaml:"tempBuildDir"` }
type NextjsCachePolicyProps ¶
type NextjsCachePolicyProps struct { ImageCachePolicy awscloudfront.ICachePolicy `field:"optional" json:"imageCachePolicy" yaml:"imageCachePolicy"` LambdaCachePolicy awscloudfront.ICachePolicy `field:"optional" json:"lambdaCachePolicy" yaml:"lambdaCachePolicy"` StaticCachePolicy awscloudfront.ICachePolicy `field:"optional" json:"staticCachePolicy" yaml:"staticCachePolicy"` // Cache-control max-age default for static assets (/_next/*). // // Default: 30 days. StaticClientMaxAgeDefault awscdk.Duration `field:"optional" json:"staticClientMaxAgeDefault" yaml:"staticClientMaxAgeDefault"` }
type NextjsDefaultsProps ¶
type NextjsDefaultsProps struct { // Override static file deployment settings. AssetDeployment *NextjsAssetsDeploymentPropsDefaults `field:"optional" json:"assetDeployment" yaml:"assetDeployment"` // Override CloudFront distribution settings. Distribution *NextjsDistributionPropsDefaults `field:"optional" json:"distribution" yaml:"distribution"` // Override server lambda function settings. Lambda *awslambda.FunctionOptions `field:"optional" json:"lambda" yaml:"lambda"` }
Defaults for created resources.
Why `any`? see https://github.com/aws/jsii/issues/2901
type NextjsDistribution ¶
type NextjsDistribution interface { constructs.Construct // The AWS Certificate Manager certificate for the custom domain. Certificate() awscertificatemanager.ICertificate SetCertificate(val awscertificatemanager.ICertificate) CustomDomainName() *string // If the custom domain is enabled, this is the URL of the website with the custom domain. CustomDomainUrl() *string // The internally created CloudFront `Distribution` instance. Distribution() awscloudfront.Distribution SetDistribution(val awscloudfront.Distribution) // The domain name of the internally created CloudFront Distribution. DistributionDomain() *string // The ID of the internally created CloudFront Distribution. DistributionId() *string // The Route 53 hosted zone for the custom domain. HostedZone() awsroute53.IHostedZone SetHostedZone(val awsroute53.IHostedZone) // The tree node. Node() constructs.Node Props() *NextjsDistributionProps SetProps(val *NextjsDistributionProps) TempBuildDir() *string SetTempBuildDir(val *string) // The CloudFront URL of the website. Url() *string LookupHostedZone() awsroute53.IHostedZone // Returns a string representation of this construct. ToString() *string ValidateCustomDomainSettings() }
Create a CloudFront distribution to serve a Next.js application.
func NewNextjsDistribution ¶
func NewNextjsDistribution(scope constructs.Construct, id *string, props *NextjsDistributionProps) NextjsDistribution
type NextjsDistributionCdkProps ¶
type NextjsDistributionCdkProps struct { // Pass in a value to override the default settings this construct uses to create the CloudFront `Distribution` internally. Distribution *awscloudfront.DistributionProps `field:"optional" json:"distribution" yaml:"distribution"` }
type NextjsDistributionProps ¶
type NextjsDistributionProps struct { // Optional value used to install NextJS node dependencies. // // It defaults to 'npx --yes open-next@1 build'. BuildCommand *string `field:"optional" json:"buildCommand" yaml:"buildCommand"` // The directory to execute `npm run build` from. // // By default, it is `nextjsPath`. // Can be overridden, particularly useful for monorepos where `build` is expected to run // at the root of the project. BuildPath *string `field:"optional" json:"buildPath" yaml:"buildPath"` // 0 - no compression, fastest 9 - maximum compression, slowest. // Default: 1. // CompressionLevel *float64 `field:"optional" json:"compressionLevel" yaml:"compressionLevel"` // Custom environment variables to pass to the NextJS build and runtime. Environment *map[string]*string `field:"optional" json:"environment" yaml:"environment"` // Used in conjunction with nextJsPath to skip building NextJS app and assume .open-next folder already exists. Useful when using `next dev` for local development. // Deprecated: use `openNextPath` instead. IsPlaceholder *bool `field:"optional" json:"isPlaceholder" yaml:"isPlaceholder"` // Relative path to the directory where the NextJS project is located. // // Can be the root of your project (`.`) or a subdirectory (`packages/web`). // // One of `openNextPath`, `nextJsPath` or `nextjsPath` must be supplied. // Deprecated: use `nextJsPath` instead. NextjsPath *string `field:"optional" json:"nextjsPath" yaml:"nextjsPath"` // Relative path to the directory where the NextJS project is located. // // Can be the root of your project (`.`) or a subdirectory (`packages/web`). // // One of `openNextPath` or `nextJsPath` must be supplied. NextJsPath *string `field:"optional" json:"nextJsPath" yaml:"nextJsPath"` // Optional value for NODE_ENV during build and runtime. NodeEnv *string `field:"optional" json:"nodeEnv" yaml:"nodeEnv"` // Relative path to the OpenNext package named `.open-next` by default. // // One of `openNextPath` or `nextJsPath` must be supplied. OpenNextPath *string `field:"optional" json:"openNextPath" yaml:"openNextPath"` // Less build output. Quiet *bool `field:"optional" json:"quiet" yaml:"quiet"` // Optional arn for the sharp lambda layer. // // If omitted, the layer will be created. SharpLayerArn *string `field:"optional" json:"sharpLayerArn" yaml:"sharpLayerArn"` // Directory to store temporary build files in. // // Defaults to os.tmpdir(). TempBuildDir *string `field:"optional" json:"tempBuildDir" yaml:"tempBuildDir"` // Lambda function to optimize images. // // Must be provided if you want to serve dynamic requests. ImageOptFunction awslambda.IFunction `field:"required" json:"imageOptFunction" yaml:"imageOptFunction"` // Built NextJS app. NextBuild NextjsBuild `field:"required" json:"nextBuild" yaml:"nextBuild"` // Lambda function to route all non-static requests to. // // Must be provided if you want to serve dynamic requests. ServerFunction awslambda.IFunction `field:"required" json:"serverFunction" yaml:"serverFunction"` // Bucket containing static assets. // // Must be provided if you want to serve static files. StaticAssetsBucket awss3.IBucket `field:"required" json:"staticAssetsBucket" yaml:"staticAssetsBucket"` // Override the default CloudFront cache policies created internally. CachePolicies *NextjsCachePolicyProps `field:"optional" json:"cachePolicies" yaml:"cachePolicies"` // Overrides for created CDK resources. Cdk *NextjsDistributionCdkProps `field:"optional" json:"cdk" yaml:"cdk"` // The customDomain for this website. Supports domains that are hosted either on [Route 53](https://aws.amazon.com/route53/) or externally. // // Note that you can also migrate externally hosted domains to Route 53 by // [following this guide](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/MigratingDNS.html). // // Example: // new NextjsDistribution(this, "Dist", { // customDomain: "domain.com", // }); // // new NextjsDistribution(this, "Dist", { // customDomain: { // domainName: "domain.com", // domainAlias: "www.domain.com", // hostedZone: "domain.com" // }, // }); // CustomDomain interface{} `field:"optional" json:"customDomain" yaml:"customDomain"` // Override lambda function url auth type. // Default: "NONE". // FunctionUrlAuthType awslambda.FunctionUrlAuthType `field:"optional" json:"functionUrlAuthType" yaml:"functionUrlAuthType"` // Override the default CloudFront origin request policies created internally. OriginRequestPolicies *NextjsOriginRequestPolicyProps `field:"optional" json:"originRequestPolicies" yaml:"originRequestPolicies"` // Optional value to prefix the edge function stack It defaults to "Nextjs". StackPrefix *string `field:"optional" json:"stackPrefix" yaml:"stackPrefix"` // Include the name of your deployment stage if present. // // Used to name the edge functions stack. // Required if using SST. StageName *string `field:"optional" json:"stageName" yaml:"stageName"` }
type NextjsDistributionPropsDefaults ¶ added in v0.0.5
type NextjsDistributionPropsDefaults struct { // Optional value used to install NextJS node dependencies. // // It defaults to 'npx --yes open-next@1 build'. BuildCommand *string `field:"optional" json:"buildCommand" yaml:"buildCommand"` // The directory to execute `npm run build` from. // // By default, it is `nextjsPath`. // Can be overridden, particularly useful for monorepos where `build` is expected to run // at the root of the project. BuildPath *string `field:"optional" json:"buildPath" yaml:"buildPath"` // 0 - no compression, fastest 9 - maximum compression, slowest. // Default: 1. // CompressionLevel *float64 `field:"optional" json:"compressionLevel" yaml:"compressionLevel"` // Custom environment variables to pass to the NextJS build and runtime. Environment *map[string]*string `field:"optional" json:"environment" yaml:"environment"` // Used in conjunction with nextJsPath to skip building NextJS app and assume .open-next folder already exists. Useful when using `next dev` for local development. // Deprecated: use `openNextPath` instead. IsPlaceholder *bool `field:"optional" json:"isPlaceholder" yaml:"isPlaceholder"` // Relative path to the directory where the NextJS project is located. // // Can be the root of your project (`.`) or a subdirectory (`packages/web`). // // One of `openNextPath`, `nextJsPath` or `nextjsPath` must be supplied. // Deprecated: use `nextJsPath` instead. NextjsPath *string `field:"optional" json:"nextjsPath" yaml:"nextjsPath"` // Relative path to the directory where the NextJS project is located. // // Can be the root of your project (`.`) or a subdirectory (`packages/web`). // // One of `openNextPath` or `nextJsPath` must be supplied. NextJsPath *string `field:"optional" json:"nextJsPath" yaml:"nextJsPath"` // Optional value for NODE_ENV during build and runtime. NodeEnv *string `field:"optional" json:"nodeEnv" yaml:"nodeEnv"` // Relative path to the OpenNext package named `.open-next` by default. // // One of `openNextPath` or `nextJsPath` must be supplied. OpenNextPath *string `field:"optional" json:"openNextPath" yaml:"openNextPath"` // Less build output. Quiet *bool `field:"optional" json:"quiet" yaml:"quiet"` // Optional arn for the sharp lambda layer. // // If omitted, the layer will be created. SharpLayerArn *string `field:"optional" json:"sharpLayerArn" yaml:"sharpLayerArn"` // Directory to store temporary build files in. // // Defaults to os.tmpdir(). TempBuildDir *string `field:"optional" json:"tempBuildDir" yaml:"tempBuildDir"` // Override the default CloudFront cache policies created internally. CachePolicies *NextjsCachePolicyProps `field:"optional" json:"cachePolicies" yaml:"cachePolicies"` // Overrides for created CDK resources. Cdk *NextjsDistributionCdkProps `field:"optional" json:"cdk" yaml:"cdk"` // The customDomain for this website. Supports domains that are hosted either on [Route 53](https://aws.amazon.com/route53/) or externally. // // Note that you can also migrate externally hosted domains to Route 53 by // [following this guide](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/MigratingDNS.html). // // Example: // new NextjsDistribution(this, "Dist", { // customDomain: "domain.com", // }); // // new NextjsDistribution(this, "Dist", { // customDomain: { // domainName: "domain.com", // domainAlias: "www.domain.com", // hostedZone: "domain.com" // }, // }); // CustomDomain interface{} `field:"optional" json:"customDomain" yaml:"customDomain"` // Override lambda function url auth type. // Default: "NONE". // FunctionUrlAuthType awslambda.FunctionUrlAuthType `field:"optional" json:"functionUrlAuthType" yaml:"functionUrlAuthType"` // Lambda function to optimize images. // // Must be provided if you want to serve dynamic requests. ImageOptFunction awslambda.IFunction `field:"optional" json:"imageOptFunction" yaml:"imageOptFunction"` // Built NextJS app. NextBuild NextjsBuild `field:"optional" json:"nextBuild" yaml:"nextBuild"` // Override the default CloudFront origin request policies created internally. OriginRequestPolicies *NextjsOriginRequestPolicyProps `field:"optional" json:"originRequestPolicies" yaml:"originRequestPolicies"` // Lambda function to route all non-static requests to. // // Must be provided if you want to serve dynamic requests. ServerFunction awslambda.IFunction `field:"optional" json:"serverFunction" yaml:"serverFunction"` // Optional value to prefix the edge function stack It defaults to "Nextjs". StackPrefix *string `field:"optional" json:"stackPrefix" yaml:"stackPrefix"` // Include the name of your deployment stage if present. // // Used to name the edge functions stack. // Required if using SST. StageName *string `field:"optional" json:"stageName" yaml:"stageName"` // Bucket containing static assets. // // Must be provided if you want to serve static files. StaticAssetsBucket awss3.IBucket `field:"optional" json:"staticAssetsBucket" yaml:"staticAssetsBucket"` }
Effectively a Partial<NextjsDistributionProps> to satisfy JSII.
type NextjsDomainProps ¶
type NextjsDomainProps struct { // The domain to be assigned to the website URL (ie. domain.com). // // Supports domains that are hosted either on [Route 53](https://aws.amazon.com/route53/) or externally. DomainName *string `field:"required" json:"domainName" yaml:"domainName"` // Specify additional names that should route to the Cloudfront Distribution. AlternateNames *[]*string `field:"optional" json:"alternateNames" yaml:"alternateNames"` // Import the certificate for the domain. // // By default, SST will create a certificate with the domain name. The certificate will be created in the `us-east-1`(N. Virginia) region as required by AWS CloudFront. // // Set this option if you have an existing certificate in the `us-east-1` region in AWS Certificate Manager you want to use. Certificate awscertificatemanager.ICertificate `field:"optional" json:"certificate" yaml:"certificate"` // An alternative domain to be assigned to the website URL. // // Visitors to the alias will be redirected to the main domain. (ie. `www.domain.com`). // // Use this to create a `www.` version of your domain and redirect visitors to the root domain. DomainAlias *string `field:"optional" json:"domainAlias" yaml:"domainAlias"` // Import the underlying Route 53 hosted zone. HostedZone awsroute53.IHostedZone `field:"optional" json:"hostedZone" yaml:"hostedZone"` // Set this option if the domain is not hosted on Amazon Route 53. IsExternalDomain *bool `field:"optional" json:"isExternalDomain" yaml:"isExternalDomain"` }
type NextjsLambdaProps ¶
type NextjsLambdaProps struct { // Optional value used to install NextJS node dependencies. // // It defaults to 'npx --yes open-next@1 build'. BuildCommand *string `field:"optional" json:"buildCommand" yaml:"buildCommand"` // The directory to execute `npm run build` from. // // By default, it is `nextjsPath`. // Can be overridden, particularly useful for monorepos where `build` is expected to run // at the root of the project. BuildPath *string `field:"optional" json:"buildPath" yaml:"buildPath"` // 0 - no compression, fastest 9 - maximum compression, slowest. // Default: 1. // CompressionLevel *float64 `field:"optional" json:"compressionLevel" yaml:"compressionLevel"` // Custom environment variables to pass to the NextJS build and runtime. Environment *map[string]*string `field:"optional" json:"environment" yaml:"environment"` // Used in conjunction with nextJsPath to skip building NextJS app and assume .open-next folder already exists. Useful when using `next dev` for local development. // Deprecated: use `openNextPath` instead. IsPlaceholder *bool `field:"optional" json:"isPlaceholder" yaml:"isPlaceholder"` // Relative path to the directory where the NextJS project is located. // // Can be the root of your project (`.`) or a subdirectory (`packages/web`). // // One of `openNextPath`, `nextJsPath` or `nextjsPath` must be supplied. // Deprecated: use `nextJsPath` instead. NextjsPath *string `field:"optional" json:"nextjsPath" yaml:"nextjsPath"` // Relative path to the directory where the NextJS project is located. // // Can be the root of your project (`.`) or a subdirectory (`packages/web`). // // One of `openNextPath` or `nextJsPath` must be supplied. NextJsPath *string `field:"optional" json:"nextJsPath" yaml:"nextJsPath"` // Optional value for NODE_ENV during build and runtime. NodeEnv *string `field:"optional" json:"nodeEnv" yaml:"nodeEnv"` // Relative path to the OpenNext package named `.open-next` by default. // // One of `openNextPath` or `nextJsPath` must be supplied. OpenNextPath *string `field:"optional" json:"openNextPath" yaml:"openNextPath"` // Less build output. Quiet *bool `field:"optional" json:"quiet" yaml:"quiet"` // Optional arn for the sharp lambda layer. // // If omitted, the layer will be created. SharpLayerArn *string `field:"optional" json:"sharpLayerArn" yaml:"sharpLayerArn"` // Directory to store temporary build files in. // // Defaults to os.tmpdir(). TempBuildDir *string `field:"optional" json:"tempBuildDir" yaml:"tempBuildDir"` // Built nextJS application. NextBuild NextjsBuild `field:"required" json:"nextBuild" yaml:"nextBuild"` // Override function properties. Lambda *awslambda.FunctionOptions `field:"optional" json:"lambda" yaml:"lambda"` }
type NextjsLayer ¶
type NextjsLayer interface { awslambda.LayerVersion // The runtimes compatible with this Layer. CompatibleRuntimes() *[]awslambda.Runtime // The environment this resource belongs to. // // For resources that are created and managed by the CDK // (generally, those created by creating new class instances like Role, Bucket, etc.), // this is always the same as the environment of the stack they belong to; // however, for imported resources // (those obtained from static methods like fromRoleArn, fromBucketName, etc.), // that might be different than the stack they were imported into. Env() *awscdk.ResourceEnvironment // The ARN of the Lambda Layer version that this Layer defines. LayerVersionArn() *string // The tree node. Node() constructs.Node // Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource. // // This value will resolve to one of the following: // - a concrete value (e.g. `"my-awesome-bucket"`) // - `undefined`, when a name should be generated by CloudFormation // - a concrete name generated automatically during synthesis, in // cross-environment scenarios. PhysicalName() *string // The stack in which this resource is defined. Stack() awscdk.Stack // Add permission for this layer version to specific entities. // // Usage within // the same account where the layer is defined is always allowed and does not // require calling this method. Note that the principal that creates the // Lambda function using the layer (for example, a CloudFormation changeset // execution role) also needs to have the “lambda:GetLayerVersion“ // permission on the layer version. AddPermission(id *string, permission *awslambda.LayerVersionPermission) // Apply the given removal policy to this resource. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). ApplyRemovalPolicy(policy awscdk.RemovalPolicy) GeneratePhysicalName() *string // Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`). // // Normally, this token will resolve to `arnAttr`, but if the resource is // referenced across environments, `arnComponents` will be used to synthesize // a concrete ARN with the resource's physical name. Make sure to reference // `this.physicalName` in `arnComponents`. GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string // Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`). // // Normally, this token will resolve to `nameAttr`, but if the resource is // referenced across environments, it will be resolved to `this.physicalName`, // which will be a concrete name. GetResourceNameAttribute(nameAttr *string) *string // Returns a string representation of this construct. ToString() *string }
Lambda layer for Next.js. Contains Sharp 0.30.0.
func NewNextjsLayer ¶
func NewNextjsLayer(scope constructs.Construct, id *string, props *NextjsLayerProps) NextjsLayer
type NextjsLayerProps ¶
type NextjsLayerProps struct { }
type NextjsOriginRequestPolicyProps ¶
type NextjsOriginRequestPolicyProps struct { FallbackOriginRequestPolicy awscloudfront.IOriginRequestPolicy `field:"optional" json:"fallbackOriginRequestPolicy" yaml:"fallbackOriginRequestPolicy"` ImageOptimizationOriginRequestPolicy awscloudfront.IOriginRequestPolicy `field:"optional" json:"imageOptimizationOriginRequestPolicy" yaml:"imageOptimizationOriginRequestPolicy"` LambdaOriginRequestPolicy awscloudfront.IOriginRequestPolicy `field:"optional" json:"lambdaOriginRequestPolicy" yaml:"lambdaOriginRequestPolicy"` }
type NextjsProps ¶
type NextjsProps struct { // Optional value used to install NextJS node dependencies. // // It defaults to 'npx --yes open-next@1 build'. BuildCommand *string `field:"optional" json:"buildCommand" yaml:"buildCommand"` // The directory to execute `npm run build` from. // // By default, it is `nextjsPath`. // Can be overridden, particularly useful for monorepos where `build` is expected to run // at the root of the project. BuildPath *string `field:"optional" json:"buildPath" yaml:"buildPath"` // 0 - no compression, fastest 9 - maximum compression, slowest. // Default: 1. // CompressionLevel *float64 `field:"optional" json:"compressionLevel" yaml:"compressionLevel"` // Custom environment variables to pass to the NextJS build and runtime. Environment *map[string]*string `field:"optional" json:"environment" yaml:"environment"` // Used in conjunction with nextJsPath to skip building NextJS app and assume .open-next folder already exists. Useful when using `next dev` for local development. // Deprecated: use `openNextPath` instead. IsPlaceholder *bool `field:"optional" json:"isPlaceholder" yaml:"isPlaceholder"` // Relative path to the directory where the NextJS project is located. // // Can be the root of your project (`.`) or a subdirectory (`packages/web`). // // One of `openNextPath`, `nextJsPath` or `nextjsPath` must be supplied. // Deprecated: use `nextJsPath` instead. NextjsPath *string `field:"optional" json:"nextjsPath" yaml:"nextjsPath"` // Relative path to the directory where the NextJS project is located. // // Can be the root of your project (`.`) or a subdirectory (`packages/web`). // // One of `openNextPath` or `nextJsPath` must be supplied. NextJsPath *string `field:"optional" json:"nextJsPath" yaml:"nextJsPath"` // Optional value for NODE_ENV during build and runtime. NodeEnv *string `field:"optional" json:"nodeEnv" yaml:"nodeEnv"` // Relative path to the OpenNext package named `.open-next` by default. // // One of `openNextPath` or `nextJsPath` must be supplied. OpenNextPath *string `field:"optional" json:"openNextPath" yaml:"openNextPath"` // Less build output. Quiet *bool `field:"optional" json:"quiet" yaml:"quiet"` // Optional arn for the sharp lambda layer. // // If omitted, the layer will be created. SharpLayerArn *string `field:"optional" json:"sharpLayerArn" yaml:"sharpLayerArn"` // Directory to store temporary build files in. // // Defaults to os.tmpdir(). TempBuildDir *string `field:"optional" json:"tempBuildDir" yaml:"tempBuildDir"` // Allows you to override defaults for the resources created by this construct. Defaults *NextjsDefaultsProps `field:"optional" json:"defaults" yaml:"defaults"` // Optional S3 Bucket to use, defaults to assets bucket. ImageOptimizationBucket awss3.IBucket `field:"optional" json:"imageOptimizationBucket" yaml:"imageOptimizationBucket"` }
type NextjsS3EnvRewriter ¶
type NextjsS3EnvRewriter interface { constructs.Construct // The tree node. Node() constructs.Node RewriteNode() constructs.Construct SetRewriteNode(val constructs.Construct) // Returns a string representation of this construct. ToString() *string }
Rewrites variables in S3 objects after a deployment happens to replace CloudFormation tokens with their values.
These values are not resolved at build time because they are only known at deploy time.
func NewNextjsS3EnvRewriter ¶
func NewNextjsS3EnvRewriter(scope constructs.Construct, id *string, props *NextjsS3EnvRewriterProps) NextjsS3EnvRewriter
type NextjsS3EnvRewriterProps ¶
type NextjsS3EnvRewriterProps struct { // Optional value used to install NextJS node dependencies. // // It defaults to 'npx --yes open-next@1 build'. BuildCommand *string `field:"optional" json:"buildCommand" yaml:"buildCommand"` // The directory to execute `npm run build` from. // // By default, it is `nextjsPath`. // Can be overridden, particularly useful for monorepos where `build` is expected to run // at the root of the project. BuildPath *string `field:"optional" json:"buildPath" yaml:"buildPath"` // 0 - no compression, fastest 9 - maximum compression, slowest. // Default: 1. // CompressionLevel *float64 `field:"optional" json:"compressionLevel" yaml:"compressionLevel"` // Custom environment variables to pass to the NextJS build and runtime. Environment *map[string]*string `field:"optional" json:"environment" yaml:"environment"` // Used in conjunction with nextJsPath to skip building NextJS app and assume .open-next folder already exists. Useful when using `next dev` for local development. // Deprecated: use `openNextPath` instead. IsPlaceholder *bool `field:"optional" json:"isPlaceholder" yaml:"isPlaceholder"` // Relative path to the directory where the NextJS project is located. // // Can be the root of your project (`.`) or a subdirectory (`packages/web`). // // One of `openNextPath`, `nextJsPath` or `nextjsPath` must be supplied. // Deprecated: use `nextJsPath` instead. NextjsPath *string `field:"optional" json:"nextjsPath" yaml:"nextjsPath"` // Relative path to the directory where the NextJS project is located. // // Can be the root of your project (`.`) or a subdirectory (`packages/web`). // // One of `openNextPath` or `nextJsPath` must be supplied. NextJsPath *string `field:"optional" json:"nextJsPath" yaml:"nextJsPath"` // Optional value for NODE_ENV during build and runtime. NodeEnv *string `field:"optional" json:"nodeEnv" yaml:"nodeEnv"` // Relative path to the OpenNext package named `.open-next` by default. // // One of `openNextPath` or `nextJsPath` must be supplied. OpenNextPath *string `field:"optional" json:"openNextPath" yaml:"openNextPath"` // Less build output. Quiet *bool `field:"optional" json:"quiet" yaml:"quiet"` // Optional arn for the sharp lambda layer. // // If omitted, the layer will be created. SharpLayerArn *string `field:"optional" json:"sharpLayerArn" yaml:"sharpLayerArn"` // Directory to store temporary build files in. // // Defaults to os.tmpdir(). TempBuildDir *string `field:"optional" json:"tempBuildDir" yaml:"tempBuildDir"` ReplacementConfig *RewriteReplacementsConfig `field:"required" json:"replacementConfig" yaml:"replacementConfig"` S3Bucket awss3.IBucket `field:"required" json:"s3Bucket" yaml:"s3Bucket"` S3keys *[]*string `field:"required" json:"s3keys" yaml:"s3keys"` CloudfrontDistributionId *string `field:"optional" json:"cloudfrontDistributionId" yaml:"cloudfrontDistributionId"` Debug *bool `field:"optional" json:"debug" yaml:"debug"` }
type RewriterParams ¶
type RewriterParams struct { ReplacementConfig *RewriteReplacementsConfig `field:"required" json:"replacementConfig" yaml:"replacementConfig"` S3Bucket awss3.IBucket `field:"required" json:"s3Bucket" yaml:"s3Bucket"` S3keys *[]*string `field:"required" json:"s3keys" yaml:"s3keys"` CloudfrontDistributionId *string `field:"optional" json:"cloudfrontDistributionId" yaml:"cloudfrontDistributionId"` Debug *bool `field:"optional" json:"debug" yaml:"debug"` }
Source Files ¶
- BaseSiteDomainProps.go
- BaseSiteEnvironmentOutputsInfo.go
- BaseSiteReplaceProps.go
- CreateArchiveArgs.go
- ImageOptimizationLambda.go
- ImageOptimizationLambda__checks.go
- ImageOptimizationProps.go
- NextJsAssetsDeployment.go
- NextJsAssetsDeployment__checks.go
- NextJsLambda.go
- NextJsLambda__checks.go
- Nextjs.go
- NextjsAssetsCachePolicyProps.go
- NextjsAssetsDeploymentProps.go
- NextjsAssetsDeploymentPropsDefaults.go
- NextjsBaseProps.go
- NextjsBuild.go
- NextjsBuildProps.go
- NextjsBuild__checks.go
- NextjsCachePolicyProps.go
- NextjsDefaultsProps.go
- NextjsDistribution.go
- NextjsDistributionCdkProps.go
- NextjsDistributionProps.go
- NextjsDistributionPropsDefaults.go
- NextjsDistribution__checks.go
- NextjsDomainProps.go
- NextjsLambdaProps.go
- NextjsLayer.go
- NextjsLayerProps.go
- NextjsLayer__checks.go
- NextjsOriginRequestPolicyProps.go
- NextjsProps.go
- NextjsS3EnvRewriter.go
- NextjsS3EnvRewriterProps.go
- NextjsS3EnvRewriter__checks.go
- Nextjs__checks.go
- RewriteReplacementsConfig.go
- RewriterParams.go
- main.go