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
module.exports.hats = async (event, context) => { | |
return { | |
statusCode: 200, | |
body: JSON.stringify({ | |
message: 'This is the HATS endpiont.' | |
}), | |
}; | |
}; | |
module.exports.shoes = async (event, context) => { |
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
service: my-service | |
plugins: | |
- serverless-domain-manager | |
provider: | |
name: aws | |
runtime: nodejs12.x | |
stage: ${opt:stage, "dev"} |
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
{ | |
"name": "create-a-custom-domain-name-for-your-aws-lambda", | |
"devDependencies": { | |
"serverless-domain-manager": "^3.3.1" | |
} | |
} |
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
{"message":"Decrypted Secret: foo-bar-baz"} |
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
module.exports.getSecret = async (event, context) => { | |
return { | |
statusCode: 200, | |
body: JSON.stringify({ | |
message: `Decrypted Secret: ${process.env.myApiKey}` | |
}) | |
}; | |
}; |
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
service: my-service | |
provider: | |
name: aws | |
runtime: nodejs12.x | |
functions: | |
getSecret: | |
handler: handler.getSecret | |
environment: |
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
// foo function | |
module.exports.handler = async (event, context) => { | |
return { | |
statusCode: 200, | |
body: JSON.stringify({ | |
message: `${process.env.staticMessage} / ${process.env.dynamicMessage}`, | |
}) | |
}; | |
}; |
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
// 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" |
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
service: my-service | |
plugins: | |
- serverless-plugin-ifelse | |
provider: | |
name: aws | |
runtime: nodejs12.x | |
stage: ${opt:stage, "dev"} | |
environment: |
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
service: my-service | |
plugins: | |
- serverless-plugin-ifelse | |
provider: | |
name: aws | |
runtime: nodejs12.x | |
stage: ${opt:stage, "dev"} |