Coder Social home page Coder Social logo

presentation-lambda's Introduction

presentation-lamda

Understanding AWS Lambda

Presentation about what AWS Lambda is and how to use it effectively.

DevOps Community Poland meetup #1

November 18th, 2019 EPAM, Opolska 114, Kraków, Poland

Live demo example

Prerequisites

  • Bash
  • Docker
  • Python
  • AWS CLI
  • Terraform
  • Can be run from WSL, requires only export DOCKER_HOST=tcp://localhost:2375 to connect to Docker running on Windows host.

Development

Example Python source code is in lambda-source/index.py.

To run it simply execute ./lambda.sh run example python3.7 '{"key": "value"}' 'my_value' in that directory.

Deployment

To see what will change go to lambda-infra directory and run terraform plan. Don't forget to run terraform init before that, but it's required only once.

To apply changes run terraform apply -parallelism=1.

Update

Uncomment line 10 in lambda-source/index.py so Lambda can return back the event that triggered it.

Run it locally to see how it will behave (as described above).

Run terraform plan to see what will be changed. You will always see Terraform needing to read package tags from data aws_s3_bucket_object source and aws_lambda_function needing to check source_code_hash. But when you apply it without any changes in Terrform log you'll see it actually did nothing.

To deploy your changes run terraform apply -parallelism=1 again.

Cleanup

After testing and playing with it cleanup all created resources by running terraform destroy and confirm with yes.

presentation-lambda's People

Contributors

christophshyper 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.