File tree Expand file tree Collapse file tree 3 files changed +61
-2
lines changed
Expand file tree Collapse file tree 3 files changed +61
-2
lines changed Original file line number Diff line number Diff line change 4242 # Add your custom deployment commands here.
4343 # Below is an example for the Image resizer application.
4444 bin/build_lambdas.sh && deployment/awslocal/deploy.sh
45+ distributionId=$(awslocal cloudfront list-distributions | jq -r '.DistributionList.Items[0].Id');
46+ echo LS_PREVIEW_URL=$AWS_ENDPOINT_URL/cloudfront/$distributionId/ >> $GITHUB_ENV;
Original file line number Diff line number Diff line change 1+ {
2+ "CallerReference" : " 7809088" ,
3+ "Comment" : " Serverless Image Resizer App" ,
4+ "Origins" : {
5+ "Quantity" : 1 ,
6+ "Items" : [
7+ {
8+ "Id" : " serverless-image-resizer-app" ,
9+ "DomainName" : " webapp.s3-website.localhost.localstack.cloud:4566" ,
10+ "OriginPath" : " " ,
11+ "CustomHeaders" : {
12+ "Quantity" : 0
13+ },
14+ "S3OriginConfig" : {
15+ "OriginAccessIdentity" : " "
16+ }
17+ }
18+ ]
19+ },
20+ "DefaultCacheBehavior" : {
21+ "TargetOriginId" : " serverless-image-resizer-app" ,
22+ "ViewerProtocolPolicy" : " allow-all" ,
23+ "TrustedSigners" : {
24+ "Enabled" : false ,
25+ "Quantity" : 0
26+ },
27+ "AllowedMethods" : {
28+ "Quantity" : 2 ,
29+ "Items" : [" HEAD" , " GET" ],
30+ "CachedMethods" : {
31+ "Quantity" : 2 ,
32+ "Items" : [" HEAD" , " GET" ]
33+ }
34+ },
35+ "ForwardedValues" : {
36+ "QueryString" : true ,
37+ "Cookies" : {
38+ "Forward" : " none"
39+ },
40+ "Headers" : {
41+ "Quantity" : 0
42+ },
43+ "QueryStringCacheKeys" : {
44+ "Quantity" : 0
45+ }
46+ },
47+ "MinTTL" : 0 ,
48+ "DefaultTTL" : 86400 ,
49+ "MaxTTL" : 31536000
50+ },
51+ "Enabled" : true ,
52+ "PriceClass" : " PriceClass_All" ,
53+ "ViewerCertificate" : {
54+ "CloudFrontDefaultCertificate" : true
55+ }
56+ }
Original file line number Diff line number Diff line change @@ -71,5 +71,6 @@ awslocal lambda list-function-url-configs --function-name presign --output json
7171echo " Fetching function URL for 'list' Lambda..."
7272awslocal lambda list-function-url-configs --function-name list --output json | jq -r ' .FunctionUrlConfigs[0].FunctionUrl'
7373
74- echo " Now open the Web app under https://webapp.s3-website.localhost.localstack.cloud:4566/"
75- echo " and paste the function URLs above (make sure to use https:// as protocol)"
74+ DISTRIBUTION=$( awslocal cloudfront create-distribution --distribution-config file://bin/distribution-config.json)
75+ DISTRIBUTION_ID=$( echo " $DISTRIBUTION " | jq -r ' .Distribution.Id' )
76+ echo " Distribution created with URL: http://localhost:4566/cloudfront/$DISTRIBUTION_ID /"
You can’t perform that action at this time.
0 commit comments