# AWS Secure CloudFront Origin Bucket (for CDK v2)
[](https://github.com/gammarer/aws-secure-cloudfront-origin-bucket/blob/main/LICENSE)
[](https://www.npmjs.com/package/@gammarer/aws-secure-cloudfront-origin-bucket)
[](https://pypi.org/project/gammarer.aws-secure-cloudfront-origin-bucket/)
[](https://www.nuget.org/packages/Gammarer.CDK.AWS.ScureCloudFrontOriginBucket/)
[](https://s01.oss.sonatype.org/content/repositories/releases/com/gammarer/aws-secure-cloudfront-origin-bucket/)
[](https://github.com/gammarer/aws-secure-cloudfront-origin-bucket/actions/workflows/release.yml)
[](https://github.com/gammarer/aws-secure-cloudfront-origin-bucket/releases)
[](https://constructs.dev/packages/@gammarer/aws-secure-cloudfront-origin-bucket)
An AWS CDK construct library to create secure S3 buckets for CloudFront origin.
## Install
### TypeScript
```shell
npm install @gammarer/aws-secure-cloudfront-origin-bucket
# or
yarn add @gammarer/aws-secure-cloudfront-origin-bucket
# or
pnpm add @gammarer/aws-secure-cloudfront-origin-bucket
# or
bun add @gammarer/aws-secure-cloudfront-origin-bucket
```
### Python
```shell
pip install gammarer.aws-secure-cloudfront-origin-bucket
```
### C# / .NET
```shell
dotnet add package Gammarer.CDK.AWS.SecureCloudFrontOriginBucket
```
### Java
Add the following to pom.xml:
```xml
<dependency>
<groupId>com.gammarer</groupId>
<artifactId>aws-secure-cloudfront-origin-bucket</artifactId>
</dependency>
```
## Example
### for OAI(Origin Access Identity)
```python
import { SecureCloudFrontOriginBucket, SecureCloudFrontOriginType } from '@gammarer/aws-secure-cloudfront-origin-bucket';
const oai = new cloudfront.OriginAccessIdentity(stack, 'OriginAccessIdentity');
new SecureCloudFrontOriginBucket(stack, 'SecureCloudFrontOriginBucket', {
bucketName: 'example-origin-bucket',
cloudFrontOriginType: SecureCloudFrontOriginType.ORIGIN_ACCESS_IDENTITY,
cloudFrontOriginAccessIdentityS3CanonicalUserId: oai.cloudFrontOriginAccessIdentityS3CanonicalUserId,
});
```
### for OAC(Origin Access Control)
```python
import { SecureCloudFrontOriginBucket, SecureCloudFrontOriginType } from '@gammarer/aws-secure-cloudfront-origin-bucket';
declare const distribution: cloudfront.Distribution;
new SecureCloudFrontOriginBucket(stack, 'SecureCloudFrontOriginBucket', {
bucketName: 'example-origin-bucket',
cloudFrontOriginType: SecureCloudFrontOriginType.ORIGIN_ACCESS_CONTROL,
cloudFrontArn: `arn:aws:cloudfront::123456789:distribution/${distribution.distributionId}`,
});
```
## License
This project is licensed under the Apache-2.0 License.
Raw data
{
"_id": null,
"home_page": "https://github.com/gammarer/aws-secure-cloudfront-origin-bucket.git",
"name": "gammarer.aws-secure-cloudfront-origin-bucket",
"maintainer": null,
"docs_url": null,
"requires_python": "~=3.8",
"maintainer_email": null,
"keywords": null,
"author": "yicr<yicr@users.noreply.github.com>",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/f5/64/d41f10fafe1685d8a57a77120faf84b28cb347cb63762994f16ba50dfb53/gammarer.aws-secure-cloudfront-origin-bucket-1.4.4.tar.gz",
"platform": null,
"description": "# AWS Secure CloudFront Origin Bucket (for CDK v2)\n\n[](https://github.com/gammarer/aws-secure-cloudfront-origin-bucket/blob/main/LICENSE)\n[](https://www.npmjs.com/package/@gammarer/aws-secure-cloudfront-origin-bucket)\n[](https://pypi.org/project/gammarer.aws-secure-cloudfront-origin-bucket/)\n[](https://www.nuget.org/packages/Gammarer.CDK.AWS.ScureCloudFrontOriginBucket/)\n[](https://s01.oss.sonatype.org/content/repositories/releases/com/gammarer/aws-secure-cloudfront-origin-bucket/)\n[](https://github.com/gammarer/aws-secure-cloudfront-origin-bucket/actions/workflows/release.yml)\n[](https://github.com/gammarer/aws-secure-cloudfront-origin-bucket/releases)\n\n[](https://constructs.dev/packages/@gammarer/aws-secure-cloudfront-origin-bucket)\n\nAn AWS CDK construct library to create secure S3 buckets for CloudFront origin.\n\n## Install\n\n### TypeScript\n\n```shell\nnpm install @gammarer/aws-secure-cloudfront-origin-bucket\n# or\nyarn add @gammarer/aws-secure-cloudfront-origin-bucket\n# or\npnpm add @gammarer/aws-secure-cloudfront-origin-bucket\n# or\nbun add @gammarer/aws-secure-cloudfront-origin-bucket\n```\n\n### Python\n\n```shell\npip install gammarer.aws-secure-cloudfront-origin-bucket\n```\n\n### C# / .NET\n\n```shell\ndotnet add package Gammarer.CDK.AWS.SecureCloudFrontOriginBucket\n```\n\n### Java\n\nAdd the following to pom.xml:\n\n```xml\n<dependency>\n <groupId>com.gammarer</groupId>\n <artifactId>aws-secure-cloudfront-origin-bucket</artifactId>\n</dependency>\n```\n\n## Example\n\n### for OAI(Origin Access Identity)\n\n```python\nimport { SecureCloudFrontOriginBucket, SecureCloudFrontOriginType } from '@gammarer/aws-secure-cloudfront-origin-bucket';\n\nconst oai = new cloudfront.OriginAccessIdentity(stack, 'OriginAccessIdentity');\n\nnew SecureCloudFrontOriginBucket(stack, 'SecureCloudFrontOriginBucket', {\n bucketName: 'example-origin-bucket',\n cloudFrontOriginType: SecureCloudFrontOriginType.ORIGIN_ACCESS_IDENTITY,\n cloudFrontOriginAccessIdentityS3CanonicalUserId: oai.cloudFrontOriginAccessIdentityS3CanonicalUserId,\n});\n```\n\n### for OAC(Origin Access Control)\n\n```python\nimport { SecureCloudFrontOriginBucket, SecureCloudFrontOriginType } from '@gammarer/aws-secure-cloudfront-origin-bucket';\n\ndeclare const distribution: cloudfront.Distribution;\n\nnew SecureCloudFrontOriginBucket(stack, 'SecureCloudFrontOriginBucket', {\n bucketName: 'example-origin-bucket',\n cloudFrontOriginType: SecureCloudFrontOriginType.ORIGIN_ACCESS_CONTROL,\n cloudFrontArn: `arn:aws:cloudfront::123456789:distribution/${distribution.distributionId}`,\n});\n```\n\n## License\n\nThis project is licensed under the Apache-2.0 License.\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "AWS CloudFront distribution origin S3 bucket.",
"version": "1.4.4",
"project_urls": {
"Homepage": "https://github.com/gammarer/aws-secure-cloudfront-origin-bucket.git",
"Source": "https://github.com/gammarer/aws-secure-cloudfront-origin-bucket.git"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "41f8067808e0faea0ff1ab0e72968c26bba1d9b2b7a0163a2aa7416905cfaca6",
"md5": "e3d2223e0d4c5bf9e2861252db7d6f1f",
"sha256": "68628f3fd244a048801f82dfad3926a559428bcdec8856a2a9153915be25db49"
},
"downloads": -1,
"filename": "gammarer.aws_secure_cloudfront_origin_bucket-1.4.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e3d2223e0d4c5bf9e2861252db7d6f1f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "~=3.8",
"size": 43252,
"upload_time": "2024-04-21T18:26:50",
"upload_time_iso_8601": "2024-04-21T18:26:50.437771Z",
"url": "https://files.pythonhosted.org/packages/41/f8/067808e0faea0ff1ab0e72968c26bba1d9b2b7a0163a2aa7416905cfaca6/gammarer.aws_secure_cloudfront_origin_bucket-1.4.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "f564d41f10fafe1685d8a57a77120faf84b28cb347cb63762994f16ba50dfb53",
"md5": "df2d4619cbd44384fe41d19a633f0d9f",
"sha256": "9d71f2c6fcf2b250a099246462ad7e549e6815b1751ef34a37c49813f594c49b"
},
"downloads": -1,
"filename": "gammarer.aws-secure-cloudfront-origin-bucket-1.4.4.tar.gz",
"has_sig": false,
"md5_digest": "df2d4619cbd44384fe41d19a633f0d9f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "~=3.8",
"size": 44490,
"upload_time": "2024-04-21T18:26:52",
"upload_time_iso_8601": "2024-04-21T18:26:52.097594Z",
"url": "https://files.pythonhosted.org/packages/f5/64/d41f10fafe1685d8a57a77120faf84b28cb347cb63762994f16ba50dfb53/gammarer.aws-secure-cloudfront-origin-bucket-1.4.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-21 18:26:52",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "gammarer",
"github_project": "aws-secure-cloudfront-origin-bucket",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "gammarer.aws-secure-cloudfront-origin-bucket"
}