Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@croudtech/sst-utils
Advanced tools
Common SST configuration utilities for AWS applications.
npm install @croudtech/sst-utils
This package supports namespaced imports that mirror the directory structure of the package.
So, for example, this import from the package root...
import { stacks } from '@croudtech/sst-utils';
const { BaseConfig, ParameterMap } = stacks.modules.config;
...is equivalent to an import direct from module directly...
import { BaseConfig, ParameterMap } from '@croudtech/sst-utils/stacks/modules/config';
Utils for working with the Parameter store and Secrets manager
Below is example of defining and using a config class to access parameters and secrets in your SST based functions
import { BaseConfig, ParameterMap } from '@croudtech/sst-utils/stacks/modules/config';
// extend the BaseConfig class with the specific access your SST app needs
export class CommonConfig extends BaseConfig {
secrets = [
"AUTH_CLIENT_ID",
"AUTH_CLIENT_SECRET",
"AUTH_TOKEN_ENDPOINT",
];
configName: string = "common";
data: ParameterMap = {
CROUD_PLATFORM_API_URL: process.env.CROUD_PLATFORM_API_URL,
}
}
// initialize and load the config class
const commonConfig = new CommonConfig(stack, environment)
const commonParameters = await commonConfig.load()
// Build a policy based on the config defined in the config class
const policyConstruct = new PolicyConstruct(stack, "PolicyConstruct", {
parameters: [
...commonConfig.parameterNames,
]
})
// Use the parameters in your SST app
const apiFunction = new Function(stack, 'ApiFunction', {
handler: 'app/app.handler',
runtime: 'python3.12',
environment: {
...commonParameters,
},
initialPolicy: [
policyConstruct.parameterPolicyStatement,
policyConstruct.secretPolicyStatement
],
})
Utils for working with VPCs Below is example of defining a VPC stack in your SST app
import { StackContext, use } from "sst/constructs";
import { Vpc } from "@croudtech/sst-utils/stacks/modules/vpc";
import { Shared } from "./SharedStack";
export function VpcStack({ stack }: StackContext) {
const { params } = use(Shared)
const vpcId = params.AWS_VPC_ID as string;
const vpcInstance = new Vpc(stack, vpcId);
return {
vpc: vpcInstance.vpc,
lambdaSecurityGroups: [vpcInstance.createSecurityGroup()],
};
}
This repo will automatically publish to npm on create of a new release
FAQs
Common SST configuration utilities
We found that @croudtech/sst-utils demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.