import * as lambda from '@aws-cdk/aws-lambda';
import * as s3 from '@aws-cdk/aws-s3';
import * as s3objectlambda from '@aws-cdk/aws-s3objectlambda';
import * as cdk from '@aws-cdk/core';
const stack = new cdk.Stack();
const bucket = new s3.Bucket(stack, 'MyBucket');
const handler = new lambda.Function(stack, 'MyFunction', {
runtime: lambda.Runtime.NODEJS_14_X,
handler: 'index.handler',
code: lambda.Code.fromAsset('lambda.zip'),
});
new s3objectlambda.AccessPoint(stack, 'MyObjectLambda', {
bucket,
handler,
accessPointName: 'my-access-point',
supportsGetObjectRange: true,
supportsGetObjectPartNumber: true,
});
import { Stack } from '@aws-cdk/core';
import { Template } from '@aws-cdk/assertions';
const stack = new Stack(/* ... */);
// ...
const template = Template.fromStack(stack);
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as lambda from '@aws-cdk/aws-lambda';
import * as cdk from '@aws-cdk/core';
const logRetentionRetryOptions: lambda.LogRetentionRetryOptions = {
base: cdk.Duration.minutes(30),
maxRetries: 123,
};
import * as cdk from '@aws-cdk/core';
declare const instance: rds.DatabaseInstance;
instance.addRotationSingleUser({
automaticallyAfter: cdk.Duration.days(7), // defaults to 30 days
excludeCharacters: '!@#$%^&*', // defaults to the set " %+~`#$&*()|[]{}:;<>?!'/@\"\\"
});
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as route53 from '@aws-cdk/aws-route53';
import * as cdk from '@aws-cdk/core';
const zoneDelegationOptions: route53.ZoneDelegationOptions = {
comment: 'comment',
ttl: cdk.Duration.minutes(30),
};