Skip to main content

@quadnix/octo-aws-cdk

Index

Anchors/AwsAccount

Anchors/AwsCloudFront

Anchors/AwsDeployment

Anchors/AwsDynamoDB

Anchors/AwsEcrImage

Anchors/AwsEcs

Anchors/AwsEfs

Anchors/AwsLambdaExecution

Anchors/AwsRegion

Anchors/AwsS3StorageService

Anchors/AwsSecurityGroup

Anchors/AwsServer

Anchors/AwsServerlessEnvironment

Anchors/AwsServerlessRegion

Anchors/AwsServerlessSubnet

Anchors/AwsSubnet

Modules/Account/AwsCredentialsAccount

Modules/Account/AwsIniAccount

Modules/Account/AwsLocalstackAccount

Modules/Account/AwsMotoAccount

Modules/App/SimpleApp

Modules/Deployment/AwsDeployment

Modules/Environment/AwsEcsEnvironment

Modules/Environment/AwsServerlessEnvironment

Modules/Execution/AwsEcsExecution

Modules/Execution/AwsLambdaExecution

Modules/Filesystem/AwsEfsFilesystem

Modules/Image/AwsEcrImage

Modules/Image/AwsEcrImageTag

Modules/Region/AwsMultiAzRegion

Modules/Region/AwsServerlessRegion

Modules/Region/AwsSingleAzRegion

Modules/Server/AwsServer

Modules/Service/AwsCloudFrontInvalidationService

Modules/Service/AwsCloudFrontService

Modules/Service/AwsDynamoDBGlobalService

Modules/Service/AwsDynamoDBService

Modules/Service/AwsEcsAlbService

Modules/Service/AwsS3StaticWebsiteService

Modules/Service/AwsS3StorageService

Modules/Subnet/AwsServerlessSubnet

Modules/Subnet/AwsSimpleSubnet

Resources/Alb

Resources/AlbListener

Resources/AlbTargetGroup

Resources/CloudFrontDistribution

Resources/CloudFrontFunction

Resources/CloudFrontInvalidation

Resources/CloudWatchLogGroup

Resources/DynamoDB

Resources/DynamoDBGlobal

Resources/Ecr

Resources/EcrImageTag

Resources/EcsCluster

Resources/EcsService

Resources/EcsTaskDefinition

Resources/Efs

Resources/EfsMountTarget

Resources/IamRole

Resources/IamUser

Resources/InternetGateway

Resources/LambdaFunction

Resources/LambdaFunctionCloudFrontPermission

Resources/LambdaFunctionPermission

Resources/NatGateway

Resources/NetworkAcl

Resources/RouteTable

Resources/S3Storage

Resources/S3Website

Resources/SecurityGroup

Resources/Subnet

Resources/Vpc

Resources/AlbListener

IAlbListenerActionTypes

IAlbListenerActionTypes:

Defines the types of actions on the ALB Listener. Possible values are fixed-response, forward, or redirect. These values are mapped from the official ALB Listener Action Types document. Please refer to the AWS documentation for more information.

@group

Resources/AlbListener

fixed-response

Sends a fixed HTTP response to the client.

forward

Forwards requests to one or more target groups.

redirect

Redirects requests from one path to another.

IAlbListenerRuleTypes

IAlbListenerRuleTypes:

When the ALB receives an HTTP request, the ALB Listener evaluates rules to determine what to do with the request. This defines the types of rules on the ALB Listener. Possible values are host-header, http-header, http-request-method, path-pattern, query-string, or source-ip. These values are mapped from the official ALB Listener Rules document. Please refer to the AWS documentation for more information.

The official documentation also imposes some restrictions on rules. It is important to review those restrictions, or else resource creation might fail and get into a dirty state.

@group

Resources/AlbListener

host-header

Matches requests based on the value of the host header in the HTTP request.

http-header

Matches requests based on the value of a specified HTTP header in the HTTP request.

http-request-method

Matches requests based on the HTTP method in the HTTP request.

path-pattern

Matches requests based on the value of the path in the HTTP request.

query-string

Matches requests based on the value of the query string in the HTTP request.

source-ip

Matches requests based on the source IP address.

Resources/CloudFrontDistribution

ICloudFrontAllowedMethods

ICloudFrontAllowedMethods: typeof CLOUDFRONT_ALLOWED_METHODS[number]

The HTTP methods CloudFront forwards to the origin. CloudFront accepts these three sets alone. The type lists each in the order AWS does; validation accepts any order.

  • ['GET', 'HEAD'] - A CDN of static files.
  • ['GET', 'HEAD', 'OPTIONS'] - Static files, plus CORS preflight requests.
  • ['GET', 'HEAD', 'OPTIONS', 'PUT', 'POST', 'PATCH', 'DELETE'] - A reverse proxy in front of an API.
@group

Resources/CloudFrontDistribution

ICloudFrontCachedMethods

ICloudFrontCachedMethods: typeof CLOUDFRONT_CACHED_METHODS[number]

The HTTP methods whose responses CloudFront caches. CloudFront accepts these two sets alone, and the set must be within the allowed methods. Validation accepts any order.

@group

Resources/CloudFrontDistribution

ICloudFrontCorsMethod

ICloudFrontCorsMethod: typeof CLOUDFRONT_CORS_METHODS[number]

An HTTP method a CORS policy may allow. ALL allows every method.

@group

Resources/CloudFrontDistribution

ICloudFrontFrameOption

ICloudFrontFrameOption: typeof CLOUDFRONT_FRAME_OPTIONS[number]

A value of X-Frame-Options.

  • DENY - No site may show the page in a frame, this one included.
  • SAMEORIGIN - Only pages of this site may show the page in a frame.
@group

Resources/CloudFrontDistribution

ICloudFrontFunctionEventType

ICloudFrontFunctionEventType: typeof CLOUDFRONT_FUNCTION_EVENT_TYPES[number]

Which event in the request lifecycle an edge function runs on. A CloudFront Function may only run on a viewer event; the origin events are for Lambda@Edge.

@group

Resources/CloudFrontDistribution

ICloudFrontFunctionKind

ICloudFrontFunctionKind: typeof CLOUDFRONT_FUNCTION_KINDS[number]

Which engine runs an edge function.

  • cloudfront-function - JavaScript at the edge. It may only bind to a viewer event.
@group

Resources/CloudFrontDistribution

ICloudFrontHttpVersion

ICloudFrontHttpVersion: typeof CLOUDFRONT_HTTP_VERSIONS[number]

The newest HTTP version viewers may negotiate. A viewer that cannot speak it falls back to an older one.

  • http1.1 - HTTP/1.1 alone.
  • http2 - HTTP/2, for viewers with TLS 1.2 and SNI.
  • http2and3 - HTTP/3 as well, for viewers with TLS 1.3.
@group

Resources/CloudFrontDistribution

ICloudFrontManagedCachePolicy

ICloudFrontManagedCachePolicy: typeof CLOUDFRONT_MANAGED_CACHE_POLICIES[number]

An AWS managed cache policy a behavior may name. AWS: managed cache policies.

  • Managed-CachingDisabled - Caches nothing. For APIs and dynamic apps.
  • Managed-CachingOptimized - Caches for a day by default, keyed on the path alone. For static content.
  • Managed-CachingOptimizedForUncompressedObjects - Managed-CachingOptimized for a behavior that does not compress.
  • UseOriginCacheControlHeaders - Caches for as long as the origin's Cache-Control says, keyed on the path, Host, Origin, and every cookie.
  • UseOriginCacheControlHeaders-QueryStrings - UseOriginCacheControlHeaders, with the query string in the key too.
@group

Resources/CloudFrontDistribution

ICloudFrontManagedOriginRequestPolicy

ICloudFrontManagedOriginRequestPolicy: typeof CLOUDFRONT_MANAGED_ORIGIN_REQUEST_POLICIES[number]

An AWS managed origin request policy a behavior may name. AWS: managed origin request policies.

  • Managed-AllViewer - Forwards every header, cookie, and query string the viewer sent. For a load balancer.
  • Managed-AllViewerAndCloudFrontHeaders-2022-06 - Managed-AllViewer, plus CloudFront's own headers, such as the viewer's country.
  • Managed-AllViewerExceptHostHeader - Managed-AllViewer without Host. For API Gateway and Lambda function URLs, which reject any host but their own.
  • Managed-CORS-CustomOrigin - Forwards Origin, for a custom origin that answers CORS.
  • Managed-CORS-S3Origin - Forwards Origin and the CORS request headers, for a bucket that answers CORS.
  • Managed-HostHeaderOnly - Forwards Host alone.
  • Managed-UserAgentRefererHeaders - Forwards User-Agent and Referer alone.
@group

Resources/CloudFrontDistribution

ICloudFrontManagedResponseHeadersPolicy

ICloudFrontManagedResponseHeadersPolicy: typeof CLOUDFRONT_MANAGED_RESPONSE_HEADERS_POLICIES[number]

An AWS managed response headers policy a behavior may name. AWS: managed response headers policies.

  • Managed-CORS-and-SecurityHeadersPolicy - Managed-SimpleCORS and Managed-SecurityHeadersPolicy together.
  • Managed-CORS-With-Preflight - Allows every origin and every method, answering preflight requests too.
  • Managed-CORS-with-preflight-and-SecurityHeadersPolicy - Managed-CORS-With-Preflight and Managed-SecurityHeadersPolicy together.
  • Managed-SecurityHeadersPolicy - Adds HSTS for a year, X-Content-Type-Options: nosniff, X-Frame-Options: SAMEORIGIN, Referrer-Policy: strict-origin-when-cross-origin, and X-XSS-Protection: 1; mode=block. The origin's own values win, except for X-Content-Type-Options.
  • Managed-SimpleCORS - Allows every origin, for requests that need no preflight.
@group

Resources/CloudFrontDistribution

ICloudFrontMinimumProtocolVersion

ICloudFrontMinimumProtocolVersion: typeof CLOUDFRONT_MINIMUM_PROTOCOL_VERSIONS[number]

The oldest TLS version a viewer may connect with, and, through the year, which ciphers CloudFront offers. TLSv1.2_2021 suits a site with no viewers on old devices. AWS: protocols and ciphers per policy.

@group

Resources/CloudFrontDistribution

ICloudFrontPolicyReference

ICloudFrontPolicyReference<M>: { kind: custom; name: string } | { kind: managed; name: M }

Where a behavior reads a cache, origin request, or response headers policy from.

  • managed names one of AWS's own policies, from the list of the slot it fills, e.g. ICloudFrontManagedCachePolicy.
  • custom names one of the policies this distribution declares in its own properties.
@group

Resources/CloudFrontDistribution


Type parameters

  • M: string = string

ICloudFrontPriceClass

ICloudFrontPriceClass: typeof CLOUDFRONT_PRICE_CLASSES[number]

Which edge locations serve the distribution, which sets what it costs. A viewer outside the chosen locations is served from the nearest one inside them, more slowly.

  • PriceClass_100 - North America and Europe. The cheapest.
  • PriceClass_200 - PriceClass_100, plus most of Asia, the Middle East, and Africa.
  • PriceClass_All - Every edge location.

AWS: price classes.

@group

Resources/CloudFrontDistribution

ICloudFrontReferrerPolicy

ICloudFrontReferrerPolicy: typeof CLOUDFRONT_REFERRER_POLICIES[number]

A value of Referrer-Policy, which decides how much of the page's URL a browser sends in Referer when leaving it.

  • no-referrer - Nothing.
  • no-referrer-when-downgrade - The full URL, except from HTTPS to HTTP.
  • origin - Only the origin, e.g. https://example.com/.
  • origin-when-cross-origin - The full URL within the site; only the origin to other sites.
  • same-origin - The full URL within the site; nothing to other sites.
  • strict-origin - Only the origin, and nothing from HTTPS to HTTP.
  • strict-origin-when-cross-origin - The full URL within the site; only the origin to other sites, and nothing from HTTPS to HTTP. What browsers do when no policy is sent.
  • unsafe-url - The full URL, always.
@group

Resources/CloudFrontDistribution

ICloudFrontValueSelection

ICloudFrontValueSelection: { kind: all | allViewerAndWhitelistCloudFront | none } | { kind: allowList; values: string[] }

Which headers, cookies, or query strings of the viewer's request a policy selects.

  • none - Nothing.
  • allowList - Only the names in values, e.g. ['x-session-id']. Names only, never values.
  • all - Everything the viewer sent. Not accepted for a cache policy's headers.
  • allViewerAndWhitelistCloudFront - Every header the viewer sent, plus CloudFront's own. Only accepted for an origin request policy's headers.

Header names are not case-sensitive. Cookie and query string names are, and so are their values: ?lang=en and ?lang=EN are two different requests to CloudFront.

@group

Resources/CloudFrontDistribution

ICloudFrontViewerProtocolPolicy

ICloudFrontViewerProtocolPolicy: typeof CLOUDFRONT_VIEWER_PROTOCOL_POLICIES[number]

What CloudFront does with a plain HTTP request.

  • allow-all - Serves it over HTTP.
  • https-only - Refuses it with a 403.
  • redirect-to-https - Redirects it to HTTPS with a 301.
@group

Resources/CloudFrontDistribution

Resources/DynamoDB

IDynamoDBBillingTypes

IDynamoDBBillingTypes:

The billing modes a DynamoDB table can use, and the settings each one takes.

@group

Resources/DynamoDB

PAY_PER_REQUEST

PROVISIONED

Resources/IamRole

IIamRoleAssumeRolePolicy

IIamRoleAssumeRolePolicy: ecs-tasks.amazonaws.com | lambda.amazonaws.com

The AWS service principal a role is assumed by. A role trusts one of these for every service that runs as it, and a service missing from the list cannot use the role at all.

  • ecs-tasks.amazonaws.com: an ECS task runs as the role.
  • lambda.amazonaws.com: a Lambda function runs as the role.
@group

Resources/IamRole

IIamRolePolicyTypes

IIamRolePolicyTypes:

Defines the types of policies that can be attached to this IAM role.

@group

Resources/IamRole

assume-role-policy

assume-role-policy: IIamRoleAssumeRolePolicy

You can provide a policy that allows the role to assume another role, or establish trust relationships. See IIamRoleAssumeRolePolicy for options.

aws-policy

aws-policy: string

You can provide a policy that allows the role to perform actions on AWS resources. This can be a predefined AWS managed policy ARN or custom policy ARN that you create.

cloudwatch-log-group-write-policy

cloudwatch-log-group-write-policy: IIamRoleCloudWatchLogGroupWritePolicy

You can provide a log group in the role's own account the role may write log events to.

dynamodb-table-access-policy

dynamodb-table-access-policy: IIamRoleDynamoDBTablePolicy

You can provide options to create a policy for accessing a DynamoDB table.

iam-statements-policy

iam-statements-policy: { actions: string[]; resources: string[] }[]

You can provide IAM statements to allow, each as actions on resource ARNs, written into one policy.

lambda-function-invoke-policy

lambda-function-invoke-policy: IIamRoleLambdaFunctionInvokePolicy[]

You can provide Lambda functions to invoke, directly or through their URLs, written into one policy.

s3-storage-access-policy

s3-storage-access-policy: IIamRoleS3BucketPolicy

You can provide options to create a policy for accessing a S3 bucket.

Resources/IamUser

IIamUserPolicyTypes

IIamUserPolicyTypes:

Defines the types of policies that can be attached to this IAM user.

@group

Resources/IamUser

dynamodb-table-access-policy

dynamodb-table-access-policy: IIamUserDynamoDBTablePolicy

You can provide options to create a policy for accessing a DynamoDB table.

s3-storage-access-policy

s3-storage-access-policy: IIamUserS3BucketPolicy

You can provide options to create a policy for accessing a S3 bucket.

Resources/S3Storage

IS3StorageCorsMethod

IS3StorageCorsMethod: typeof S3_STORAGE_CORS_METHODS[number]

An HTTP method a CORS rule of the s3 storage may allow.

@group

Resources/S3Storage

IS3StoragePrincipalType

IS3StoragePrincipalType: typeof S3_STORAGE_PRINCIPAL_TYPES[number]

The kind of principal a permission admits.

  • aws - An IAM principal, such as a role, named by its ARN.
  • cloudfront - A CloudFront distribution, admitted through origin access control. It may only read.
@group

Resources/S3Storage