npm.io
1.0.1 • Published 6 years ago

aws-migration-essentials

Licence
ISC
Version
1.0.1
Deps
1
Size
6 kB
Vulns
1
Weekly
0

AWS-Migration-Essentials

The purpose of the Package is to migrate SSM between one region to another. In future this package will have migration for databases, pipelines and elastic beanstalk as well.

Getting Started

Prerequisites

  1. Install Node
Installing
npm i aws-migration-essentials

Usage

const AWS = require('aws-sdk')
const express = require('express')
const app = express()
const port = 3000
const awsEssentials = require('aws-migration-essentials')

app.listen(port, () => console.log(`AWS Migration app listening at http://localhost:${port}`))
app.get('/clone', async (req, res) => {
    const {origin, destination, overwrite} = req.query
    const result = await awsEssentials.cloneSSM(origin, destination, (overwrite === 'true'))
    const Response = {
        ResponseCode: '000',
        ResponseStatus: 'SUCCESS',
        CloneResult: result
      }
    res.status(200).send(Response)
})
app.get('/migrate', async (req, res) => {
    const {origin, destination, overwrite} = req.query
    const result = await awsEssentials.migrateSSM(origin, destination, (overwrite === 'true'))
    const Response = {
        ResponseCode: '000',
        ResponseStatus: 'SUCCESS',
        CloneResult: result
      }
    res.status(200).send(Response)
})

Authors

  • Arslan Fareed