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
Parameters: | |
FnName: | |
Type: String | |
ProvisionedConcurrency: | |
Type: String | |
Default: 10 | |
EnableAliasProvisionedConcurrency: | |
Type: String | |
AllowedValues: | |
- true |
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
const originalString = "I would love to eat apple and banana." | |
const wordsMap = { | |
'apple' : "mango", | |
'banana' : "grapes", | |
} | |
const replaceStrings = (value) => { | |
return Object.keys(wordsMap).reduce((result, oldString) => result.replace(new RegExp(oldString, 'g'), wordsMap[oldString]), value) | |
} |
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
// Demo link https://play.golang.org/p/J-n45Ddk_Mf | |
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
) | |
type ServiceTypeHelper struct { |
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 | |
# Get function ARN from stack | |
FUNCNAME="MyFunctionName" | |
FUNCARN=$(aws cloudformation describe-stacks \ | |
--stack-name "Stack-Name" \ | |
--query "Stacks[0].Outputs[?OutputKey==${FUNCNAME}].OutputValue" --output text | |
) | |
echo $FUNCARN |
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
<?php | |
use Aws\Credentials\Credentials; | |
use GuzzleHttp\Psr7\Request; | |
use Aws\Signature\SignatureV4; | |
use Aws\Sts\StsClient; | |
use GuzzleHttp\Client; | |
/** | |
* Sandbox is IAM profile with the user permissions to: | |
* 1- execute-api:Invoke against the API Gateway resource |
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
# --------------------------------------------------------------------------- | |
# | |
# Description: This file holds all my BASH configurations and aliases | |
# | |
# Sections: | |
# 1. Environment Configuration | |
# 2. Make Terminal Better (remapping defaults and adding functionality) | |
# 3. File and Folder Management | |
# 4. Searching | |
# 5. Process Management |