Skip to content

Instantly share code, notes, and snippets.

Kevin Chisholm kevinchisholm

Block or report user

Report or block kevinchisholm

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View create-a-custom-domain-name-for-your-aws-lambda-example-3.js
module.exports.hats = async (event, context) => {
return {
statusCode: 200,
body: JSON.stringify({
message: 'This is the HATS endpiont.'
}),
};
};
module.exports.shoes = async (event, context) => {
View create-a-custom-domain-name-for-your-aws-lambda-example-2.yml
service: my-service
plugins:
- serverless-domain-manager
provider:
name: aws
runtime: nodejs12.x
stage: ${opt:stage, "dev"}
View create-a-custom-domain-name-for-your-aws-lambda-example-1.json
{
"name": "create-a-custom-domain-name-for-your-aws-lambda",
"devDependencies": {
"serverless-domain-manager": "^3.3.1"
}
}
View securely-reference-secrets-in-serverless.yml.example-2.js
module.exports.getSecret = async (event, context) => {
return {
statusCode: 200,
body: JSON.stringify({
message: `Decrypted Secret: ${process.env.myApiKey}`
})
};
};
View securely-reference-secrets-in-serverless.yml.example-1.yml
service: my-service
provider:
name: aws
runtime: nodejs12.x
functions:
getSecret:
handler: handler.getSecret
environment:
View implement-if-then-logic-in-your-serverless.yml-file.ex-3-c.js
// DEV/TEST
{
"message" : "this is a static message / this is a dynamic DEV/TEST message"
}
// PROD
{
"message" : "this is a static message / this is a dynamic PROD message"
View implement-if-then-logic-in-your-serverless.yml-file.ex-3-b.yml
// foo function
module.exports.handler = async (event, context) => {
return {
statusCode: 200,
body: JSON.stringify({
message: `${process.env.staticMessage} / ${process.env.dynamicMessage}`,
})
};
};
View implement-if-then-logic-in-your-serverless.yml-file.ex-3-a.yml
service: my-service
plugins:
- serverless-plugin-ifelse
provider:
name: aws
runtime: nodejs12.x
stage: ${opt:stage, "dev"}
environment:
View implement-if-then-logic-in-your-serverless.yml-file.ex-2.yml
service: my-service
plugins:
- serverless-plugin-ifelse
provider:
name: aws
runtime: nodejs12.x
stage: ${opt:stage, "dev"}
You can’t perform that action at this time.