Skip to content

Deploying a COBOL program to AWS Lambda with the Serverless framework

Notifications You must be signed in to change notification settings

cpaika/hello-world-cobol-lambda

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hello World Cobol with AWS Lambda

This repository contains a 'Hello World' COBOL program that can deploy and run on AWS Lambda, fronted by an API Gateway. This is the companion code for my blog post on the topic.

Prerequisites

We need the following tools to run and deploy this application: GnuCOBOL, Serverless Framework, and Docker

On MacOS you can use Homebrew to install them:

  1. brew install gnu-cobol
  2. brew install docker
  3. brew install serverless

Running Locally

  1. Build the application:
cobc -x hello.cob
  1. Run the application:
./hello

Deploying and running on AWS

  1. Follow these instructions to setup your Serverless AWS Credentials.
  2. Build the deployable artifacts:
./build.sh
  1. Deploy the artifact:
sls deploy
  1. Navigate to the API Gateway console and find the domain for your API Gateway
  2. Hit the endpoint to see the response:
curl --silent https://<your api gateway id>.us-east-1.amazonaws.com/dev/

Cleanup

To cleanup your AWS resources run: serverless remove

About

Deploying a COBOL program to AWS Lambda with the Serverless framework

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published