Code Monkey home page Code Monkey logo

lambda-wm's Introduction

terraform-lambda

This repo has a simple Lambda function which written in Python 3.9. The function can be deployed by the Terraform. The CD for this whole module is using Jenkins, details can be found in the Jenkins file along with the repo.

Terraform module

  1. The Terraform version is 1.0.11
  2. The Lambda module should be suited for most Lambda deployment.
  3. The module will create an IAM role along with the Lambda function also a Cloudwatch log group.
  4. The module use AWS s3 as backend.
  5. If you want to deploy it to other AWS account, please change the backend and if needed also the region.
  6. The source module if under the folder lambda
  7. The Terraform run time file is on the top layer (can also move to the specific folder if for monorepo case.)

CI/CD

  1. Using Jenkins for CI/CD here.
  2. Jenkins is running on Kubernetes and using Jenkins config as code.
  3. The pod template is no need to change as the using the Terraform official latest image.
  4. The pipeline will send notification to Slack channel for the build info.
  5. There is one parameter for the build which you can choose to create/update or destroy the Lambda funtion.

Requirements

Name Version
terraform >= 0.13.0

Modules

Name Source Version
lambda ./lambda n/a

Resources

No resources.

Inputs

Name Description Type Default Required
aws_region The region of AWS string "ap-southeast-1" no
function_name Unique name for your Lambda Function. string "Lambda function Greg" no
handler Function entrypoint in your code string "" no
output_file_name The archive file output file name string "" no
runtime Identifier of the function's runtime string "" no
source_file_name The archive file source file anme string "" no
tags A map of tags to apply to the Lambda function. map(string) {} no

Outputs

Name Description
arn Amazon Resource Name (ARN) identifying your Lambda Function.
cloudwatch_loggroup The ARN of the CLoudwatch loggroup.
invoke_arn ARN to be used for invoking Lambda Function from API Gateway - to be used in aws_api_gateway_integration's uri.
last_modified Date this resource was last modified.
qualified_arn ARN identifying your Lambda Function Version (if versioning is enabled via publish = true).
rols_arn The ARN of the Iam role which created for the Lambda funtion.
source_code_size Size in bytes of the function .zip file.
tags_all A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
version Latest published version of your Lambda Function.
vpc_config ID of the VPC.

lambda-wm's People

Watchers

James Cloos avatar Greg 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.