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
#!/bin/bash | |
#================================================================ | |
# HEADER | |
#================================================================ | |
#% SYNOPSIS | |
#+ ${SCRIPT_NAME} --distributionId "argument" --path "argument" [--help] | |
#% | |
#% DESCRIPTION | |
#% Function to run AWS CDN invalidation and finishes when invalidation status is set to Completed. Invalidation path is set to '/*' by default. |
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
#!/bin/bash | |
#================================================================ | |
# HEADER | |
#================================================================ | |
#% SYNOPSIS | |
#+ ${SCRIPT_NAME} --tagName "argument" --tagValue "argument" --scriptFile "argument" --command "argument" --timeout "argument" [--comment] "argument" [--help] [--version] | |
#% | |
#% DESCRIPTION | |
#% Helper function for running external shell scripts on multiple instances with AWS SSM. |
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
// AWS Cognito public keys are available at address: | |
// https://cognito-idp.{region}.amazonaws.com/{userPoolId}/.well-known/jwks.json | |
publicKeysURL := "https://cognito-idp.{region}.amazonaws.com/{userPoolId}/.well-known/jwks.json" | |
// Start with downloading public keys information | |
// The .Fetch method is used from https://github.com/lestrrat-go/jwx package | |
publicKeySet, err := jwk.Fetch(publicKeysURL) | |
if err != nil{ | |
log.Printf("failed to parse key: %s", err) | |
} |
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
{ | |
"version": "2.0.0", | |
"tasks": [ | |
{ | |
"label": "S3 deploy", | |
"type": "shell", | |
"command": "hugo --minify && aws s3 sync public/ ${input:s3bucket} --delete --exclude \"*css\" --exclude \"*.js\" --exclude \"*.png\" --exclude \"*.jpg\" --exclude \"*.woff\" && echo '--- s3 upload with cache-control: ---' && aws s3 cp public/ ${input:s3bucket} --recursive --exclude \"*\" --include \"*css\" --include \"*.js\" --include \"*.png\" --include \"*.jpg\" --include \"*.webp\" --include \"*.woff\" --cache-control \"max-age=31536000\"", | |
"group": "build", | |
"problemMatcher": [] | |
}, |