
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
cloudfriend
Advanced tools
Helper functions for assembling CloudFormation templates in JavaScript
These are functions that you can use in place of various CloudFormation objects.
| CloudFriend | CloudFormation |
|---|---|
| base64(value) | Fn::Base64 |
| findInMap(mapping, key, attr) | Fn::FindInMap |
| getAtt(obj, key) | Fn::GetAtt |
| getAzs(region) | Fn::GetAZs |
| join(delimiter, pieces) | Fn::Join |
| select(index, list) | Fn::Select |
| ref(name) | Ref |
| userData(lines) | Fn::Base64 and Fn::Join with \n delimiter |
| and(conditions) | Fn::And |
| equals(a, b) | Fn::Equals |
| if(condition, ifTrue, ifFalse) | Fn::If |
| not(condition) | Fn::Not |
| or(conditions) | Fn::Or |
| notEquals(a, b) | Fn::Not and Fn::Equals |
| sub(str, variables) | Fn::Sub |
| importValue(sharedValue) | Fn::ImportValue |
These are static properties of cloudfriend that you can use to reference various CloudFormation objects.
| CloudFriend | CloudFormation |
|---|---|
| accountId | AWS::AccountId |
| notificationArns | AWS::NotificationARNs |
| noValue | AWS::NoValue |
| region | AWS::Region |
| stackId | AWS::StackId |
| stackName | AWS::StackName |
| method | description |
|---|---|
| build(file, opts) | Builds a template defined by a static JavaScript export, a synchronous or an asynchronous function. |
| validate(file) | Uses the cloudformation:ValidateTemplate API call to perform rudimentary template validation |
| merge(...template) | Merges templates together. Throws errors if logical names are reused |
By installing cloudfriend globally, it can provide you with simple CLI tools for building and validating CloudFormation templates.
# either...
$ git clone https://github.com/mapbox/cloudfriend && cd cloudfriend && npm link
# ... or ...
$ npm install -g cloudfriend
Then, to build a template:
# Prints the template as JSON to stdout
$ build-template path/to/template.js
Or, to validate a template:
# Make sure that your shell is configured to make AWS requests
$ validate-template path/to/template.js
v1.7.0
cloudfriend.permissions, which exports a CloudFormation template which creates an AWS user and access key with permission to run cloudfriend.validate().FAQs
Helper functions for assembling CloudFormation templates in JavaScript
The npm package cloudfriend receives a total of 17 weekly downloads. As such, cloudfriend popularity was classified as not popular.
We found that cloudfriend demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 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.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.