GithubHelp home page GithubHelp logo

aws-docker-container-helper's Introduction

AWS Lambda Docker Container Helper

A cli helper for windows

Requirements: AWS CLI tool. can be downloaded from amazon AWS credentials set. after downloading & installing the AWS CLI tool run 'aws configure' from the CLI and input credentials there Amazon has a help document for configuring the AWS CLI tool. look it up if you're having issues

Description: When deploying AWS Lambda Docker containers to AWS from the CLI, you end up using the same commands over and over again this tool creates several bat files when provided your AWS account number and region Add the folder these commands reside in to your PATH variable, and you can call them from anywhere. when you have a CLI open in the directory of the source code of the container you'd like to send to AWS, you have these commands avaliable:

Commands:

!! Important this command MUST be run before any of the other commands become accessible This command only needs to be run ONCE unless you want to access a different amazon account number or account region. Create-Commands [amazon account number] [amazon account region] Description: Creates all the following commands. this command MUST be ran first. The Create-Commands.bat file should be in its OWN folder, and that folder should be added to the PATH through Environemnt Variables

Build [name of image] Runs: docker build -t [name of image] . Description: First step of PUSH-ing (deploying) your container to AWS

Create-Repo [name of image] Runs: aws ecr create-repository --repository-name [name of image] --image-scanning-configuration scanOnPush=true Description: creates a repository on amazon ecr with the name provided. the name provided should be identical to the image name in the Build.bat command

Deploy [name of image] Runs: docker tag [name of image] [amazon account number].dkr.ecr.[amazon account region].amazonaws.com/[name of image] aws ecr get-login-password | docker login --username AWS --password-stdin [amazon account number].dkr.ecr.[amazon account region].amazonaws.com docker push [amazon account number].dkr.ecr.[amazon account region].amazonaws.com/[name of image]:latest Description: tags a docker container with the [name of image] in the format that amazon repo deployment requires, then logs docker into your aws account then pushes the tagged container into your repository. [name of image] should be identical to [name of image] from the Build.bat command and the Create-Repo.bat command. both commands MUST be ran first for the inital deployment, but after the first deployment, only Build.bat needs to be run before this command. [amazon account number] and [amazon account region] are already populated when Create-Commands is run.

Test [name of image] Runs docker run -dp 9000:8080 [name of image[ Description: runs the container in a detached mode. To test your llambda you can curl, or use Postman and direct a request to http://localhost:9000/2015-03-31/functions/function/invocations to do some rudimentary tests.

This utility also has compound commands to further optimize deployment

Build-Deploy [name of image] Runs the Build.bat command then the Deploy.bat command

Build-Test [name of image] Runsthe Build.bat command then the Deploy.bat command

aws-docker-container-helper's People

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.