@@ -27,33 +27,34 @@ image will be served from S3 directly.
27
27
28
28
2 . Deploy the CloudFormation stack
29
29
30
- Run ` bin/deploy ` to deploy the CloudFormation stack. It will create a
31
- temporary Amazon S3 bucket, package and upload the function, and create the
32
- Lambda function, Amazon API Gateway RestApi, and an S3 bucket for images via
33
- CloudFormation.
30
+ Run ` bin/deploy ` to deploy the CloudFormation stack. It will create a
31
+ temporary Amazon S3 bucket, package and upload the function, and create the
32
+ Lambda function, Amazon API Gateway RestApi, and an S3 bucket for images via
33
+ CloudFormation.
34
34
35
- The deployment script requires the [ AWS CLI] [ cli ] version 1.11.19 or newer to
36
- be installed.
35
+ The deployment script requires the [ AWS CLI] [ cli ] version 1.11.19 or newer
36
+ to be installed.
37
37
38
38
3 . Test the function
39
39
40
- Upload an image to the S3 bucket and try to resize it via your web browser to
41
- different sizes, e.g. with an image uploaded in the bucket called image.png:
40
+ Upload an image to the S3 bucket and try to resize it via your web browser
41
+ to different sizes, e.g. with an image uploaded in the bucket called
42
+ image.png:
42
43
43
- - http://[ BucketWebsiteHost] /300x300/path/to/image.png
44
- - http://[ BucketWebsiteHost] /90x90/path/to/image.png
45
- - http://[ BucketWebsiteHost] /40x40/path/to/image.png
44
+ - http://[ BucketWebsiteHost] /300x300/path/to/image.png
45
+ - http://[ BucketWebsiteHost] /90x90/path/to/image.png
46
+ - http://[ BucketWebsiteHost] /40x40/path/to/image.png
46
47
47
- You can find the ` BucketWebsiteUrl ` in the table of outputs displayed on a
48
- successful invocation of the deploy script.
48
+ You can find the ` BucketWebsiteUrl ` in the table of outputs displayed on a
49
+ successful invocation of the deploy script.
49
50
50
51
4 . (Optional) Restrict resize dimensions
51
52
52
- To restrict the dimensions the function will create, set the environment
53
- variable ` ALLOWED_DIMENSIONS ` to a string in the format
54
- * (HEIGHT)x(WIDTH),(HEIGHT)x(WIDTH),...* .
53
+ To restrict the dimensions the function will create, set the environment
54
+ variable ` ALLOWED_DIMENSIONS ` to a string in the format
55
+ * (HEIGHT)x(WIDTH),(HEIGHT)x(WIDTH),...* .
55
56
56
- For example: * 300x300,90x90,40x40* .
57
+ For example: * 300x300,90x90,40x40* .
57
58
58
59
## License
59
60
0 commit comments