
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
codedeploy-scripts
Advanced tools
AWS CodeDeploy lifecycle scripts using ES6 to deploy a node app to EC2.
npm install codedeploy-scripts
In the app folder, you only need two simple files to handle the deployment.
###appspec.yml
This tells CodeDeploy to copy everything to /apps/appname and run deployment.js for all lifecycle events. ApplicationStop is omitted, but you can use it if you are extremely confident in the quality of your code, or just enjoy manually fixing broken servers.
version: 0.0
os: linux
files:
+ source: /
destination: /apps/appname
hooks:
# ApplicationStop:
# - location: deployment.js
# timeout: 180
BeforeInstall:
+ location: deployment.js
timeout: 180
AfterInstall:
+ location: deployment.js
timeout: 180
ApplicationStart:
+ location: deployment.js
timeout: 180
ValidateService:
+ location: deployment.js
timeout: 180
Extends the deployment class with any custom actions needed on CodeDeploy lifecycle events. Deployment.run() will call the appropriate method based on the LIFECYCLE_EVENT variable set by CodeDeploy.
The below code will run /apps/deploytest/server.js on port 5000, with nginx as a reverse proxy and serving static files on deploytest.example.com:80
#!/usr/bin/env node
var SimpleDeployment = require("codedeploy-scripts").SimpleDeployment;
var deployment = new SimpleDeployment({
appName: "deploytest",
nodePort: "5000",
serverScript: "server.js",
domains: "deploytest.example.com",
buildFolder: "build",
staticFolder: "static"
});
deployment.run();
For more complex scenarios, just create a custom subclass based on the implementation of SimpleDeployment.
To keep things simple, the code makes a few assumptions.
FAQs
AWS CodeDeploy lifecycle scripts using ES6 to deploy a node app to EC2
The npm package codedeploy-scripts receives a total of 11 weekly downloads. As such, codedeploy-scripts popularity was classified as not popular.
We found that codedeploy-scripts demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.