git clone https://github.com/yapawa/imageResize.git
cd imageResize
nvm use
npm ci
cp -a stages/production.sample.yml stages/production.yml
Edit stages/production.yml:
profile: AWSProfileName
region: AWSRegion
suffix: "" # Or "-stage" for a multi stage deploy
cacheBucket: cacheBucketName
srcBucket: <aws_user_files_s3_bucket>
srcPrefix: public # Important
domainName: img.gallery.example.com
hostedZoneId: hostedZoneId
certificateArn: arn:aws:acm:us-east-1:yyyyyyyy:certificate/zzzzzzz
lambda:
memorySize: 1024
timeout: 30
logRetention: "30"
npm run deploy
This will take some time, mainly due to the creation of the Cloudfront Distribution.
If you want to deploy several stacks in a same AWS account, you need to create different stages files and deploy the stack for each of them.
npx sls -s stageName deploy