1
0
Fork 0
mirror of https://github.com/imjasonh/lambda-ko synced 2026-07-07 00:33:42 +00:00
No description
Find a file
2021-09-30 10:03:37 -04:00
.ko.yaml initial commit 2021-09-30 10:03:37 -04:00
deploy.sh initial commit 2021-09-30 10:03:37 -04:00
go.mod initial commit 2021-09-30 10:03:37 -04:00
go.sum initial commit 2021-09-30 10:03:37 -04:00
LICENSE initial commit 2021-09-30 10:03:37 -04:00
main.go initial commit 2021-09-30 10:03:37 -04:00
README.md initial commit 2021-09-30 10:03:37 -04:00
setup.sh initial commit 2021-09-30 10:03:37 -04:00

Demo: Using ko to build and run on AWS Lambda

One time setup

  1. Create an ECR repository
  • set KO_DOCKER_REPO=[account-number].dkr.ecr.[region].amazonaws.com/[repository]
  1. Get the Lambda role URN
  • set ROLE=[account-number]:role/service-role/[role-name]
  1. Build and create the functions
  • ./setup.sh will build images and create the functions.

Each code update

  1. Build and update the functions
  • ./deploy.sh will build images and update the functions.

Known Issues

  • For now, you can't use the aws CLI to create functions that specify CPU architectures (--architectures); this seems to only be available in the v1 CLI. Until this is supported, create these functions in the console UI.

  • Lambda doesn't seem to allow you to specify multi-arch images, so you need to build arch-specific images and deploy them to the correct function architecture.