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
"Outputs": { | |
"ApiEndpoint": { | |
"Description": "Link to API endpoint for sending image requests to.", | |
"Value": { | |
"Fn::Sub": "https://${ImageHandlerDistribution.DomainName}" | |
} | |
}, | |
"DemoUrl": { | |
"Description": "Link to the demo user interface for the solution.", | |
"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
resource "aws_cloudformation_stack" "my_test_stack" { | |
name = "MYTESTSTACK" | |
capabilities = ["CAPABILITY_NAMED_IAM"] | |
template_body = <<STACK | |
// ADD CLOUD FORMATION TEMPLATE HERE, USING HEREDOC SYNTAX | |
STACK | |
} |
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: >- | |
(SO0023) - Serverless Image Handler with aws-solutions-constructs: This | |
template deploys and configures a serverless architecture that is optimized | |
for dynamic image manipulation and delivery at low latency and cost. Leverages | |
SharpJS for image processing. Template version v5.0.0 | |
AWSTemplateFormatVersion: 2010-09-09 | |
Metadata: | |
'AWS::CloudFormation::Interface': | |
ParameterGroups: | |
- Label: |
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 cloudformation create-stack --stack-name MYTESTSTACK --template-body FILE --capabilities CAPABILITY_NAMED_IAM | |
// or | |
aws cloudformation create-stack --stack-name MYTESTSTACK --template-url AWS_S3_URL --capabilities CAPABILITY_NAMED_IAM |
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": "(SO0023) - Serverless Image Handler with aws-solutions-constructs: This template deploys and configures a serverless architecture that is optimized for dynamic image manipulation and delivery at low latency and cost. Leverages SharpJS for image processing. Template version v5.0.0", | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Metadata": { | |
"AWS::CloudFormation::Interface": { | |
"ParameterGroups": [ | |
{ | |
"Label": { | |
"default": "CORS Options" | |
}, |
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
plugins: | |
- serverless-offline | |
- serverless-webpack | |
- serverless-dotenv-plugin | |
# Nome do projeto | |
# Será usado para construir o nome da Lambda e do API Gateway | |
service: testing-deploy | |
# Existem vários serviços que utilizam o Serverless Framework |
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 path = require("path"); | |
const slsw = require("serverless-webpack"); | |
const nodeExternals = require("webpack-node-externals"); | |
module.exports = { | |
entry: slsw.lib.entries, | |
module: { | |
rules: [ | |
{ | |
test: /\.ts$/, |
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 dateInTimestap = 1541089363 | |
const date = new Date(dateInTimestap*1000) | |
console.log(date) | |
console.log(date.toString()) | |
console.log(date.toLocaleTimeString()) |
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
Show hidden characters
{ | |
"compilerOptions": { | |
"target": "es6", | |
"declaration": true, | |
"module": "commonjs", | |
"sourceMap": true, | |
"moduleResolution": "node", | |
"emitDecoratorMetadata": true, | |
"experimentalDecorators": true, | |
"noImplicitAny": 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 name = 'Joao' | |
const age = 21 | |
const message = ` | |
Hi, my name is ${name}. | |
I am ${age} years old. | |
My elder brother is ${age + 5} | |
` |
NewerOlder