Serverless function of resizing image for Macguider
- Provided as Lambda@Edge of existing cloudfront distribution, triggered by image request and respond with resized image
Configuration by environment variable should be done before running the app.
- At:
env.prod.json
or.env.dev.json
file
- About:
LAMBDA_ROLE_ARN
: ARN of existing Lambda role consisting of required authorityCLOUDFRONT_DISTRIBUTION_ID
: ID of Cloudfront distribution to apply resizingS3_BUCKET
: Name of S3 bucket of target images
{
"LAMBDA_ROLE_ARN": "arn:aws:iam::xxxxxxxxxxxx:role/xxxxxxxx",
"CLOUDFRONT_DISTRIBUTION_ID": "xxxxxxxxxxxx",
"S3_BUCKET": "xxxxxxxxxxxx",
}
$ npm install
$ npm run offline
$ npm run deploy
type(scope): Subject
body
footer
feat
: A new featurefix
: A bug fixdocs
: Changes to documentationstyle
: Formatting, missing semi colons, etc; no code changerefactor
: Refactoring production codetest
: Adding tests, refactoring test; no production code changechore
: Updating build tasks, package manager configs, etc; no production code change
If you think a new commit type is needed, you can contribute by changing commitlint.config.js
and this paragraph.
master
: branch to manage only stable states deployed to productdevelop
: branch to integrate features to be deployed (development is mainly based on this branch)feature
: branch to develop new featureshotfix
: branch to correct urgent issues
- branch
feature
fromdevelop
-> develop features infeature
-> pull request todevelop
-> approve and merge todevelop
develop
become distributable -> mergedevelop
tomaster
, deploymaster
to product, add a version tag tomaster
- branch
hotfix
frommaster
-> fix issues inhotfix
-> pull request tomaster
-> approve and merge tomaster
anddevelop
feature/swm-issue#
ex) feature/swm-123