
Security News
Another Round of TEA Protocol Spam Floods npm, But It’s Not a Worm
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.
@cuckoointernet/aws-constructs
Advanced tools
This repo contains thin wrappers for CDK constructs to ensure a consistent standard is applied to generated cloud resources and to avoid repetitive boilerplate code.
This repo contains thin wrappers for CDK constructs to ensure a consistent standard is applied to generated cloud resources and to avoid repetitive boilerplate code.
There are a few conventions when using this library to be aware of.
ENVIRONMENT and CUSTOMER to be declared via the CLI: 2. ENVIRONMENT - eg: dev, stage, prod etc but you can use whatever you want 3. CUSTOMER - a string representing the end client of your software. This library is built with a SaaS mindset, where each customer can have their own configuration. If this doesn't apply to you we recommend simply using your own business name.cdk.context.json file should adopt a structure of:{
"cuckoo": {
// <--- customer(s)
"prod": {
// <--- environment(s)
"logLevel": "debug" // <--- option(s)
}
}
}
Where a more complete example might look something like:
{
"cuckoo": {
"dev": {
"logLevel": "debug"
},
"prod": {
"logLevel": "info"
}
},
"acme": {
"dev": {
"logLevel": "info",
"alarmNotificationsTopic": "acme-sns-topic-dev",
"yourCustomOptions": "foo"
},
"prod": {
"logLevel": "error",
"alarmNotificationsTopic": "acme-sns-topic-prod",
"yourCustomOptions": "bar"
}
}
}
lambda.FunctionAs well as the usual defaults, this construct will additionally configure the following for you:
${id}-${ENVIRONMENT}ENVIRONMENT based on the CDK context value ENVIRONMENTLOG_LEVEL based on the CDK context value <customer>.<environment>.logLevel (Default: debug)insightsVersion is configured)<customer>.<environment>.alarmNotificationsTopicssmParameterPaths property via the 4th parameterimport * as lambda from "aws-cdk-lib/aws-lambda";
import * as AWSConstructs from "@cuckoointernet/aws-constructs";
class ExampleFunction extends AWSConstructs.lambda.Function {
constructor(
scope: Construct,
id: string,
props: lambda.FunctionProps,
customProps?: CustomLambdaProps
) {
super(
scope,
ExampleFunction.name,
{
handler: "index.handler",
code: lambda.Code.fromAsset(path.join(__dirname, "../build")),
// To override the default behaviour of this construct you can supply your own props here...
// See: https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Function.html#construct-props
},
{
// Custom AWS Construct options
}
);
}
}
lambda.NodejsFunctionAs well as the usual defaults, this construct will additionally configure the same properties as lambda.Function. This construct is specifically aimed at taking advantage of the same great defaults, but giving the option to use esbuild to build Lambda source code.
import * as lambdaNode from "aws-cdk-lib/aws-lambda-nodejs";
import * as CuckooConstructs from "@cuckoointernet/cuckoo-constructs";
class ExampleFunction extends CuckooConstructs.lambda.NodejsFunction {
constructor(
scope: Construct,
id: string,
props: lambdaNode.NodejsFunctionProps,
customProps?: CustomLambdaProps
) {
super(
scope,
ExampleFunction.name,
{
entry: "src/lambda/node-mock-handler.ts",
handler: "handleTheStuff",
// To override the default behaviour of this construct you can supply your own props here...
// See: https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Function.html#construct-props
},
{
// Custom Cuckoo Construct options
}
);
}
}
sqs.QueueAs well as the usual defaults, this construct will additionally configure the following for you:
<customer>.<environment>.alarmNotificationsTopicimport * as AWSConstructs from "@cuckoointernet/aws-constructs";
class ExampleQueue extends AWSConstructs.sqs.Queue {
constructor(scope: Construct) {
super(
scope,
ExampleQueue.name,
{
// To override the default behaviour of this construct you can supply your own props here...
// See: https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sqs.Queue.html#construct-props
},
{
// Custom AWS Construct options
}
);
}
}
sqs.DeadLetterQueueThe CDK doesn't include a DLQ construct out of the box, this is our take on what one should look like. As well as the usual defaults, this construct will additionally configure the following for you:
<customer>.<environment>.alarmNotificationsTopicimport * as AWSConstructs from "@cuckoointernet/aws-constructs";
class ExampleDlq extends AWSConstructs.sqs.DeadLetterQueue {
constructor(scope: Construct) {
super(
scope,
ExampleDlq.name,
{
// To override the default behaviour of this construct you can supply your own props here...
// See: https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sqs.Queue.html#construct-props
},
{
// Custom AWS Construct options
}
);
}
}
dynamodb.TableAs well as the usual defaults, this construct will additionally configure the following for you:
pointInTimeRecovery to trueimport * as AWSConstructs from "@cuckoointernet/aws-constructs";
class ExampleTable extends AWSConstructs.dynamodb.Table {
constructor(scope: Construct) {
super(scope, ExampleTable.name, {
partitionKey: {
name: "id",
type: AttributeType.STRING,
},
// To override the default behaviour of this construct you can supply your own props here...
// See: https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_dynamodb.Table.html#construct-props
});
}
}
s3.BucketAs well as the usual defaults, this construct will additionally configure the following for you:
true.import * as AWSConstructs from "@cuckoointernet/aws-constructs";
class ExampleBucket extends AWSConstructs.s3.Bucket {
constructor(scope: Construct) {
super(scope, ExampleBucket.name, {
// To override the default behaviour of this construct you can supply your own props here...
// See: https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_s3.Bucket.html#construct-props
});
}
}
stepfunctions.StateMachineAs well as the usual defaults, this construct will additionally configure the following for you:
<customer>.<environment>.alarmNotificationsTopicimport * as lambda from "aws-cdk-lib/aws-lambda";
import * as sfn from "aws-cdk-lib/aws-stepfunctions";
import * as AWSConstructs from "@cuckoointernet/aws-constructs";
class ExampleStateMachine extends AWSConstructs.stepfunctions.StateMachine {
constructor(scope: Constructid: string, props: sfn.StateMachineProps, customProps?: CustomStateMachineProps) {
const definition = new sfn.Pass(scope, "InitialPass");
super(
scope,
ExampleStateMachine.name,
{
definition,
// To override the default behaviour of this construct you can supply your own props here...
// See: https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_stepfunctions.StateMachine.html#construct-props
},
{
// Custom AWS Construct options
}
);
}
}
utils.getContextByPathA utility function that can be used to retrieve a nested value from the CDK context:
Example cdk.context.json:
{
"cuckoo": {
"prod": {
"logLevel": "debug"
}
}
}
import { utils } from "@cuckoointernet/aws-constructs";
const logLevel = utils.getContextByPath(
scope,
`cuckoo.prod.logLevel`
) as string; // => debug
Amir Sekhavati 💻 | Elliot Massey 💻 | Julian Inwood 💻 | Georgia Georgiou 💻 | Luke Swift 💻 | Ben Parnell 💻 | Dan 💻 |
FAQs
This repo contains thin wrappers for CDK constructs to ensure a consistent standard is applied to generated cloud resources and to avoid repetitive boilerplate code.
We found that @cuckoointernet/aws-constructs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?

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

Security News
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.