Skip to content

ssukanmi/webservice

Repository files navigation

webservice

A web api application
Serverless code using aws lambda: Serveless
Infrastructure as code using AWS CloudFormation: Infrastructure

Prerequisites:

  1. Go v1.17
  2. MySQL 8.0.27

How to deploy:

  1. Clone the repository
  2. Edit .envfile with your db credentials
  3. Run the command go run server.go in the terminal from the repository directory

Packer

Prerequisites:

  1. packer 1.7.10

How to deploy:

  1. Export packer log export PACKER_LOG=1
  2. Build image
packer build \
    -var 'aws_access_key=' \
    -var 'aws_secret_key=' \
    -var 'aws_region=us-east-1' \
    -var 'subnet_id=subnet-0f960342a73f60dc2' \
    -var 'source_ami=ami-033b95fb8079dc481' \
    ami.pkr.hcl

OR

packer build --var-file=variables.pkrvars.hcl ami.pkr.hcl

About

a web api application

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published