Coder Social home page Coder Social logo

e-mit / aws-lambda-get Goto Github PK

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

Create a repeating AWS Lambda function to GET HTTP json data and transfer it into an AWS SQS queue

Home Page: http://grafana.e-mit.dev

License: GNU Affero General Public License v3.0

Shell 64.76% Python 35.24%
aws aws-lambda cloudformation python requests

aws-lambda-get's Introduction

AWS Lambda GET

local tests cloud tests coverage flake8 mypy pycodestyle pydocstyle pylint pyright bandit

Creates an AWS Lambda function which GETs json data from an HTTP endpoint, on a repeating periodic schedule, and puts the data into an AWS SQS queue.

This project configures AWS using the CLI with a CloudFormation/SAM template. The SQS queue must already exist.

See also

Readme Contents

Testing

Tests and linting checks run via GitHub actions after each push. Tests can be run locally (no interaction with AWS), or with AWS (cloud tests).

Local tests

Run all tests and linting with local-tests.sh

Cloud tests

These require AWS CLI authentication. Run with cloud-tests.sh

Deployment

  1. Provide values for the environment variables listed in example_config.sh
  2. Execute script setup.sh. This will create the resources and start the lambda.
  3. Optional: change log level using: ./stack.sh <stack name> loglevel <log level string e.g. DEBUG>
  4. Stop the lambda and delete all resources using: ./stack.sh <stack name> delete

Development

After deploying the stack, the lambda code and the packaged Python library dependencies can be updated independently, and rapidly, using the following commands:

  • Lambda function update: ./stack.sh <stack name> update_function
  • Python packages update: ./stack.sh <stack name> update_layer

To do

  • Optional headers to send with the request
  • Optional body data to send with the request
  • Optional cookie data to send with the request
  • Support API authentication

aws-lambda-get's People

Contributors

e-mit 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.