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.
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:
brew install gnu-cobol
brew install docker
brew install serverless
- Build the application:
cobc -x hello.cob
- Run the application:
./hello
- Follow these instructions to setup your Serverless AWS Credentials.
- Build the deployable artifacts:
./build.sh
- Deploy the artifact:
sls deploy
- Navigate to the API Gateway console and find the domain for your API Gateway
- Hit the endpoint to see the response:
curl --silent https://<your api gateway id>.us-east-1.amazonaws.com/dev/
To cleanup your AWS resources run:
serverless remove