// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as synthetics from '@aws-cdk/aws-synthetics';
const inlineCode = new synthetics.InlineCode('code');
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as assets from '@aws-cdk/assets';
import * as iam from '@aws-cdk/aws-iam';
import * as synthetics from '@aws-cdk/aws-synthetics';
import * as cdk from '@aws-cdk/core';
declare const dockerImage: cdk.DockerImage;
declare const grantable: iam.IGrantable;
declare const localBundling: cdk.ILocalBundling;
const assetCode = new synthetics.AssetCode('assetPath', /* all optional props */ {
assetHash: 'assetHash',
assetHashType: cdk.AssetHashType.SOURCE,
bundling: {
image: dockerImage,
// the properties below are optional
command: ['command'],
entrypoint: ['entrypoint'],
environment: {
environmentKey: 'environment',
},
local: localBundling,
outputType: cdk.BundlingOutput.ARCHIVED,
securityOpt: 'securityOpt',
user: 'user',
volumes: [{
containerPath: 'containerPath',
hostPath: 'hostPath',
// the properties below are optional
consistency: cdk.DockerVolumeConsistency.CONSISTENT,
}],
workingDirectory: 'workingDirectory',
},
exclude: ['exclude'],
follow: assets.FollowMode.NEVER,
followSymlinks: cdk.SymlinkFollowMode.NEVER,
ignoreMode: cdk.IgnoreMode.GLOB,
readers: [grantable],
sourceHash: 'sourceHash',
});
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as s3 from '@aws-cdk/aws-s3';
import * as synthetics from '@aws-cdk/aws-synthetics';
declare const bucket: s3.Bucket;
const s3Code = new synthetics.S3Code(bucket, 'key', /* all optional props */ 'objectVersion');
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',
payload: {
prop: "value",
},
});
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,
});