
Security News
Feross on the 10 Minutes or Less Podcast: Nobody Reads the Code
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.
@torus-tools/stack
Advanced tools
A promise-based SDK for generating, deploying and managing stacks in AWS with cloudformation.
A promise-based javascript SDK that generates and deploys JSON cloudformation templates for static websites in AWS. It uses the AWS SDK to create, and execute changesets in a particular sequence that enables automation of the entire process while maintaining a short deployment time.
You are free to customize the generated cloudformation template or its resources individually in any way you want using the AWS console/CLIs/SDKs and/or the torus stack SDK/CLI command. You can also push the arjan_config to github and enable other team-members (with permission) to collaborate on the stack.
Prerequisites
Deploy a static site with a CDN and HTTPS
pop up your terminal, go into your desired project cd project_name, and run arjan stack create prod
When using Torus Tools you are using your own AWS account from your own machine.
Any charges incurred by your websites will be billed directly from AWS to your AWS account.
Torus Tools does NOT have any access to your AWS account/bill.
Because the content in a static site doesnt have to be processed on a request basis it can be served completely from a server’s cache, or a cheaper cloud based object storage solution like AWS s3. To place the content closer to the end users, provide faster response times, and a secure url, a CDN (content distribution network) can be added.

For an easier development workflow we have defined some setups that include Dev, Test and Prod (production). You can customize these by additionally providing flags.
dev → test → prod
The Torus Stack SDK has a series of methods that take care of generating/provisioning cloudformation templates. The deployment process for a complete stack will first deploy a cloudformation template with an s3 bucket, public policy and a hosted zone. Then it will update it with a cloudfront distribution.
If there are existing buckets/cdn's/hosted zones for the given domain, torus will propmpt you to confirm if you want to import those resources.

This is a breakdown of the costs of hosting a static site in AWS Let’s say your website uses CloudFront for a month (30 days), and the site has 1,000 visitors each day for that month. Each visitor clicked 1 page that returned a single object (1 request) and they did this once each day for 30 days. Turns out each request is 1MB for the amount of data transferred, so in total for the month that comes to 30,000MB or 29GB (1GB = 1,024MB). Half the requests are from the US and half are from Europe, so your monthly total for data transferred comes to $2.47. Also, each click is an HTTP request, so for the month that equals 30,000 HTTP requests, which comes to a total of $0.02 for the month. Adding the two values together, the total cost for using CloudFront for this example would be $2.49 for the month.
| Resource | Consumption | Cost |
|---|---|---|
| Cloudfront | 29GB bandwith | $ 2.47 |
| Cloudfront | 30,000 http requests | $ 0.02 |
| Route53 | 1 Hosted Zone | $ 0.50 |
| s3 | 5GB storage | $ 0.15 |
| Total Cost | ------------------ | $ 3.14 |
const {deployStack} = require('../lib/deployStack')
deployStack('testingsit.com', {bucket:true}, {index:'index.html', error:'error.html', providers:{bucket:'aws'}}, true)
const stack = {
bucket: true,
www: true,
dns: true,
cdn: false,
https: false
}
const config = {
index:"index.html",
error:"error.html",
last_deployment:"",
providers: {
domain: 'godaddy',
bucket: 'aws',
cdn: 'aws',
dns: 'aws',
https: 'aws'
}
}
FAQs
A promise-based SDK for generating, deploying and managing stacks in AWS with cloudformation.
We found that @torus-tools/stack demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.