Coder Social home page Coder Social logo

brandonjbegle / lambda-edit-code-deploy-yaml Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 2 KB

An AWS lambda function that takes an input artifact from an AWS CodePipeline, unzips it, edits parts of the appspec.yaml, rezips, and returns an output artifact for use by AWS CodePipeline.

Python 100.00%

lambda-edit-code-deploy-yaml's Introduction

Edit Appspec.yaml Lambda Function For AWS CodePipeline

Simple python script (Python 3.6 Runtime) that allows for changing the AppSpec.yaml on the fly in case of different configurations for production and development.

How does it work?

  • Copy this code to a lambda function in your AWS account
  • Modify the line that says ‘ destination: XXXXXX’ to match where your code needs to deploy to.
  • Modify the index of the array to match your AppSpec.yaml line. Mine was line 5, thus data[4].
  • Make modifications/remove the script editing portions of the file. This function modifies some shell scripts that were in the application folder based on production/development.
  • Make sure your lambda function has a role that gives it access to the S3 bucket where your input artifact will be stored and CodePipelines so it can update the status to failure or success.

lambda-edit-code-deploy-yaml's People

Contributors

brandonjbegle avatar

Stargazers

Saicharan Reddy avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.