This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# CentOS-Base.repo | |
# | |
# The mirror system uses the connecting IP address of the client and the | |
# update status of each mirror to pick mirrors that are updated to and | |
# geographically close to the client. You should use this for CentOS updates | |
# unless you are manually picking other mirrors. | |
# | |
# If the mirrorlist= does not work for you, as a fall back you can try the | |
# remarked out baseurl= line instead. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# other ACM, S3 resources | |
resource "aws_cloudfront_distribution" "site_distribution" { | |
enabled = true | |
is_ipv6_enabled = true | |
aliases = [var.site_name, "www.${var.site_name}"] | |
price_class = "PriceClass_100" | |
default_root_object = "index.html" | |
# ... | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Trace - 17:42:11.817 PM] Sending request 'initialize - (1)'. | |
Params: {"capabilities":{"textDocument":{"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}}},"completion":{"completionItem":{"documentationFormat":["plaintext","markdown"]},"completionItemKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]}},"hover":{"contentFormat":["plaintext","markdown"]},"signatureHelp":{"signatureInformation":{"documentationFormat":["plaintext","markdown"],"parameterInformation":{"labelOffsetSupport":true}}},"synchronization":{"didSave":true}},"workspace":{"applyEdit":true,"configuration":true,"didChangeWatchedFiles":{"dynamicRegistration":true},"symbol":{"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]}},"workspaceEdit":{"documentChanges":true}}},"initializationOptions":{"hoverKind":"Structured"},"processId":8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
source ./functions.sh | |
# iterate over each package in array, create function and zip it | |
for func in "${function_dirs[@]}" | |
do | |
lambda_func=${func}-function | |
echo "Generating ${lambda_func} artifact" | |
# since each lambda directory contains exactly same main.go |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
source ./functions.sh | |
for func in "${function_dirs[@]}" | |
do | |
cd "${BASE_DIR}/${func}" | |
go test | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"testing" | |
atl "github.com/yogeshlonkar/aws-lambda-go-test/local" | |
) | |
func TestMain(t *testing.T) { | |
response, err := atl.Run(atl.Input{}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"github.com/aws/aws-lambda-go/lambda" | |
"your-repo/handlers" | |
) | |
func main() { | |
lambda.Start(handlers.RequestHandler) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package handlers | |
import ( | |
"context" | |
) | |
func RequestHandler(ctx context.Context) (string, error) { | |
return "some-string", nil | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# requires oathtool configuration | |
function mfa() { | |
echo valid $(expr 30 - $(date +%s) % 30)s | |
oathtool --totp --base32 <mfa-secret-key> | tee /dev/tty | pbcopy | |
} | |
# set env for terraform | |
function dazn_aws_set_env() | |
{ | |
mfa |
NewerOlder