AWS Secure Frontend Web App CloudFront Distribution (for AWS CDK v2)
AWS CloudFront distribution for frontend web app (spa) optimized.
Install
TypeScript
npm install @gammarer/aws-secure-frontend-web-app-cloudfront-distribution
# or
yarn add @gammarer/aws-secure-frontend-web-app-cloudfront-distribution
Python
pip install gammarer.aws-secure-frontend-web-app-cloudfront-distribution
C# / .NET
dotnet add package Gammarer.CDK.AWS.SecureFrontendWebAppCloudFrontDistribution
Java
Add the following to pom.xml:
<dependency>
<groupId>com.gammarer</groupId>
<artifactId>aws-secure-frontend-web-app-cloudfront-distribution</artifactId>
</dependency>
Example
for Origin Access Control
import { SecureFrontendWebAppCloudFrontDistribution, S3OriginAccessType } from '@gammarer/aws-secure-frontend-web-app-cloudfront-distribution';
declare const originBucket: s3.Bucket;
declare const accessLogBucket: s3.Bucket;
declare const certificate: acm.Certificate;
declare const cfnOriginAccessControl: cloudfront.CfnOriginAccessControl
new SecureFrontendWebAppCloudFrontDistribution(stack, 'SecureFrontendWebAppCloudFrontDistribution', {
comment: 'frontend web app distribution.', // optional
accessLogBucket: accessLogBucket, // optional
certificate: certificate,
distributionDomainName: 'example.com',
s3OriginAccessType: S3OriginAccessType.ORIGIN_ACCESS_CONTROL,
originAccessControlId: cfnOriginAccessControl.attrId,
originBucket: originBucket,
});
for Origin Access Identity
import { SecureFrontendWebAppCloudFrontDistribution, S3OriginAccessType } from '@gammarer/aws-secure-frontend-web-app-cloudfront-distribution';
declare const originBucket: s3.Bucket;
declare const accessLogBucket: s3.Bucket;
declare const certificate: acm.Certificate;
declare const originAccessIdentity: cloudfront.OriginAccessIdentity;
new SecureFrontendWebAppCloudFrontDistribution(stack, 'SecureFrontendWebAppCloudFrontDistribution', {
comment: 'frontend web app distribution.', // optional
accessLogBucket: accessLogBucket, // optional
certificate: certificate,
distributionDomainName: 'example.com',
s3OriginAccessType: S3OriginAccessType.ORIGIN_ACCESS_IDENTITY,
originAccessIdentity: originAccessIdentity,
originBucket: originBucket,
});
License
This project is licensed under the Apache-2.0 License.
Metadata
Release files for gammarer.aws-secure-frontend-web-app-cloudfront-distribution 1.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| gammarer.aws-secure-frontend-web-app-cloudfront-distribution-1.2.2.tar.gz | 36.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gammarer.aws_secure_frontend_web_app_cloudfront_distribution-1.2.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 72.6 kB
Release files / gammarer.aws-secure-frontend-web-app-cloudfront-distribution-1.2.2.tar.gz
| Download URL | gammarer.aws-secure-frontend-web-app-cloudfront-distribution-1.2.2.tar.gz |
|---|---|
| Size | 36.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5ca1b2248d40175100b438cfe438d2d3818a98c208d50b9d495f4cd155cf06b0
|
|
BLAKE2b-256 checksum How to use checksums |
3e47af97d562283913331df140cbde756cb66de4fc6324bb83b93c3e930fce30
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.3
|
Release files / gammarer.aws_secure_frontend_web_app_cloudfront_distribution-1.2.2-py3-none-any.whl
| Download URL | gammarer.aws_secure_frontend_web_app_cloudfront_distribution-1.2.2-py3-none-any.whl |
|---|---|
| Size | 35.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b661a55cfe51bbdfc6ed4a66f2848d63ded92d6129ba27aff61a6a94ac7e5630
|
|
BLAKE2b-256 checksum How to use checksums |
8d5abbdebec37419009fa573d6b38fecd2e7619246364a2651113f836a3b6e95
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.3
|