cdk-private-s3-hosting 0.0.6__py3-none-any.whl → 0.0.8__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -41,12 +41,25 @@ const privateS3Hosting = new PrivateS3Hosting(this, 'PrivateS3Hosting', {
41
41
 
42
42
  After you deploy the stack, you can access the S3 bucket using the ALB's DNS name from the VPC where the stack is deployed.
43
43
 
44
- For example, if you put the `hoge.txt` file in the S3 bucket, you can access it using the following command:
44
+ For example, if you put the `hoge.txt` file in the root of S3 bucket, you can access it using the following command:
45
45
 
46
46
  ```sh
47
47
  curl http://cryer-nao-domain.com/hoge.txt
48
48
  ```
49
49
 
50
+ ### Use existing VPC
51
+
52
+ You can use an existing VPC by specifying the `vpc` property.
53
+
54
+ ```python
55
+ declare const vpc: ec2.IVpc;
56
+
57
+ const privateS3Hosting = new PrivateS3Hosting(this, 'PrivateS3Hosting', {
58
+ domainName: 'cryer-nao-domain.com',
59
+ vpc,
60
+ });
61
+ ```
62
+
50
63
  ### Deploy the frontend assets
51
64
 
52
65
  You can deploy the frontend assets to the S3 bucket like below:
@@ -61,8 +74,7 @@ const privateS3Hosting = new PrivateS3Hosting(this, 'PrivateS3Hosting', {
61
74
 
62
75
  new s3deploy.BucketDeployment(this, 'DeployWebsite', {
63
76
  sources: [s3deploy.Source.asset('./website-dist')],
64
- destinationBucket: websiteBucket,
65
- bucket: privateS3Hosting.bucket,
77
+ destinationBucket: privateS3Hosting.bucket,
66
78
  });
67
79
  ```
68
80
 
@@ -33,9 +33,9 @@ import constructs._jsii
33
33
 
34
34
  __jsii_assembly__ = jsii.JSIIAssembly.load(
35
35
  "cdk-private-s3-hosting",
36
- "0.0.6",
36
+ "0.0.8",
37
37
  __name__[0:-6],
38
- "cdk-private-s3-hosting@0.0.6.jsii.tgz",
38
+ "cdk-private-s3-hosting@0.0.8.jsii.tgz",
39
39
  )
40
40
 
41
41
  __all__ = [
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cdk-private-s3-hosting
3
- Version: 0.0.6
3
+ Version: 0.0.8
4
4
  Summary: CDK Construct for a private frontend hosting S3 bucket
5
5
  Home-page: https://github.com/badmintoncryer/cdk-private-s3-hosting.git
6
6
  Author: Kazuho CryerShinozuka<malaysia.cryer@gmail.com>
@@ -68,12 +68,25 @@ const privateS3Hosting = new PrivateS3Hosting(this, 'PrivateS3Hosting', {
68
68
 
69
69
  After you deploy the stack, you can access the S3 bucket using the ALB's DNS name from the VPC where the stack is deployed.
70
70
 
71
- For example, if you put the `hoge.txt` file in the S3 bucket, you can access it using the following command:
71
+ For example, if you put the `hoge.txt` file in the root of S3 bucket, you can access it using the following command:
72
72
 
73
73
  ```sh
74
74
  curl http://cryer-nao-domain.com/hoge.txt
75
75
  ```
76
76
 
77
+ ### Use existing VPC
78
+
79
+ You can use an existing VPC by specifying the `vpc` property.
80
+
81
+ ```python
82
+ declare const vpc: ec2.IVpc;
83
+
84
+ const privateS3Hosting = new PrivateS3Hosting(this, 'PrivateS3Hosting', {
85
+ domainName: 'cryer-nao-domain.com',
86
+ vpc,
87
+ });
88
+ ```
89
+
77
90
  ### Deploy the frontend assets
78
91
 
79
92
  You can deploy the frontend assets to the S3 bucket like below:
@@ -88,8 +101,7 @@ const privateS3Hosting = new PrivateS3Hosting(this, 'PrivateS3Hosting', {
88
101
 
89
102
  new s3deploy.BucketDeployment(this, 'DeployWebsite', {
90
103
  sources: [s3deploy.Source.asset('./website-dist')],
91
- destinationBucket: websiteBucket,
92
- bucket: privateS3Hosting.bucket,
104
+ destinationBucket: privateS3Hosting.bucket,
93
105
  });
94
106
  ```
95
107
 
@@ -0,0 +1,9 @@
1
+ cdk-private-s3-hosting/__init__.py,sha256=i5E_EGoXa6S_9qb_-sGP-uf_EQ2_LVFy0FyrorTQnYY,20228
2
+ cdk-private-s3-hosting/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
3
+ cdk-private-s3-hosting/_jsii/__init__.py,sha256=bEoh0LKQ04lJintrmCDLMb42GpUrVpQZeU9yD4-Ms-w,1468
4
+ cdk-private-s3-hosting/_jsii/cdk-private-s3-hosting@0.0.8.jsii.tgz,sha256=0RIoopJquIjwOF_V6MekNDj5ugvo7YV3IFOmA7kzCTQ,46539
5
+ cdk_private_s3_hosting-0.0.8.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
6
+ cdk_private_s3_hosting-0.0.8.dist-info/METADATA,sha256=C1RckAEP7DJW0VTkAqgiW12COITeXU_i7DxXHXzM3eE,6582
7
+ cdk_private_s3_hosting-0.0.8.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
8
+ cdk_private_s3_hosting-0.0.8.dist-info/top_level.txt,sha256=Garilimgavjx7-oTth2AD47uG-twwl6dTXCfLYQ1lqY,23
9
+ cdk_private_s3_hosting-0.0.8.dist-info/RECORD,,
@@ -1,9 +0,0 @@
1
- cdk-private-s3-hosting/__init__.py,sha256=hzdpyH8rm2ywJWjRv530ZCzJ_Haa8RJjnlxaBP2HLV8,19991
2
- cdk-private-s3-hosting/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
3
- cdk-private-s3-hosting/_jsii/__init__.py,sha256=AesgbVrmlfRVyoAv4yo-6JraDxEDtIKkLFnA7o5vgRY,1468
4
- cdk-private-s3-hosting/_jsii/cdk-private-s3-hosting@0.0.6.jsii.tgz,sha256=Myt4ieFK1WV0SbP6Z3-PLuzHxS2Bwniy1e3SEWIWfy8,46439
5
- cdk_private_s3_hosting-0.0.6.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
6
- cdk_private_s3_hosting-0.0.6.dist-info/METADATA,sha256=s0Rnd99dbltLCOa7161H_wKIWcMCWGNf4LSt-eBoILw,6345
7
- cdk_private_s3_hosting-0.0.6.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
8
- cdk_private_s3_hosting-0.0.6.dist-info/top_level.txt,sha256=Garilimgavjx7-oTth2AD47uG-twwl6dTXCfLYQ1lqY,23
9
- cdk_private_s3_hosting-0.0.6.dist-info/RECORD,,