Skip to content

Instantly share code, notes, and snippets.

View percybolmer's full-sized avatar

ProgrammingPercy percybolmer

View GitHub Profile
@percybolmer
percybolmer / Kubernetes-101-main.go
Created August 2, 2022 05:58
Simple http server to use while learning docker
package main
import (
"fmt"
"log"
"net/http"
)
func main() {
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
@percybolmer
percybolmer / docker-file-example-entrypoint
Created May 12, 2022 13:01
docker file with entrypoint instead
FROM ubuntu
RUN apt-get -y update
RUN apt-get -y install ffmpeg
ENTRYPOINT ["ffmpeg"]
@percybolmer
percybolmer / docker-file-example
Created May 12, 2022 12:24
docker file example
FROM ubuntu
RUN apt-get -y update
RUN apt-get -y install ffmpeg
CMD ffmpeg
{
"configurations": [
{
"type": "aws-sam",
"request": "direct-invoke",
"name": "demo:SQSLambda",
"invokeTarget": {
"target": "template",
"templatePath": "${workspaceFolder}/template.yml",
"logicalId": "SQSLambda"
{
"configurations": [
{
"type": "aws-sam",
"request": "direct-invoke",
"name": "demo:SQSLambda",
"invokeTarget": {
"target": "template",
"templatePath": "${workspaceFolder}/template.yml",
"logicalId": "SQSLambda"
{
"configurations": [
{
"name": "Debug with SAM",
"type": "go",
"request": "attach",
"mode": "remote",
"port": 8099,
"host": "localhost",
package main
import (
"log"
"github.com/aws/aws-lambda-go/events"
"github.com/aws/aws-lambda-go/lambda"
)
// our lambda handler that listens on SQS events
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: >
demo
Sample SAM Template for demo
# More info about Globals: https://github.com/awslabs/serverless-application-model/blob/master/docs/globals.rst
Globals:
Function:
{
"HelloGopher": {
"my-cool-variable": "now-it-is-much-cooler"
}
}
output := fmt.Sprintf("Hello From Lambda %s, the variable is %s", input.Name, os.Getenv("my-cool-variable"))