Socket
Socket
Sign inDemoInstall

@aws-cdk/aws-s3

Package Overview
Dependencies
Maintainers
4
Versions
288
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-cdk/aws-s3 - npm Package Compare versions

Comparing version 0.12.0 to 0.13.0

16

lib/bucket.d.ts

@@ -256,2 +256,17 @@ import actions = require('@aws-cdk/aws-codepipeline-api');

lifecycleRules?: LifecycleRule[];
/**
* The name of the index document (e.g. "index.html") for the website. Enables static website
* hosting for this bucket.
*/
websiteIndexDocument?: string;
/**
* The name of the error document (e.g. "404.html") for the website.
* `websiteIndexDocument` must also be set if this is set.
*/
websiteErrorDocument?: string;
/**
* Grants public read access to all objects in the bucket.
* Similar to calling `bucket.grantPublicAccess()`
*/
publicReadAccess?: boolean;
}

@@ -330,2 +345,3 @@ /**

private parseLifecycleConfiguration;
private renderWebsiteConfiguration;
}

@@ -332,0 +348,0 @@ /**

22

package.json
{
"name": "@aws-cdk/aws-s3",
"version": "0.12.0",
"version": "0.13.0",
"description": "CDK Constructs for AWS S3",

@@ -55,16 +55,16 @@ "main": "lib/index.js",

"devDependencies": {
"@aws-cdk/assert": "^0.12.0",
"cdk-build-tools": "^0.12.0",
"cdk-integ-tools": "^0.12.0",
"cfn2ts": "^0.12.0",
"pkglint": "^0.12.0"
"@aws-cdk/assert": "^0.13.0",
"cdk-build-tools": "^0.13.0",
"cdk-integ-tools": "^0.13.0",
"cfn2ts": "^0.13.0",
"pkglint": "^0.13.0"
},
"dependencies": {
"@aws-cdk/aws-codepipeline-api": "^0.12.0",
"@aws-cdk/aws-iam": "^0.12.0",
"@aws-cdk/aws-kms": "^0.12.0",
"@aws-cdk/aws-s3-notifications": "^0.12.0",
"@aws-cdk/cdk": "^0.12.0"
"@aws-cdk/aws-codepipeline-api": "^0.13.0",
"@aws-cdk/aws-iam": "^0.13.0",
"@aws-cdk/aws-kms": "^0.13.0",
"@aws-cdk/aws-s3-notifications": "^0.13.0",
"@aws-cdk/cdk": "^0.13.0"
},
"homepage": "https://github.com/awslabs/aws-cdk"
}

@@ -58,20 +58,28 @@ ## AWS S3 Construct Library

### Bucket Policy
### Permissions
By default, a bucket policy will be automatically created for the bucket upon the first call to `addToPolicy(statement)`:
A bucket policy will be automatically created for the bucket upon the first call to
`addToResourcePolicy(statement)`:
```ts
const bucket = new Bucket(this, 'MyBucket');
bucket.addToPolicy(statement);
// we now have a policy!
bucket.addToResourcePolicy(new iam.PolicyStatement()
.addActions('s3:GetObject')
.addAllResources());
```
You can bring you own policy as well:
Most of the time, you won't have to manipulate the bucket policy directly.
Instead, buckets have "grant" methods called to give prepackaged sets of permissions
to other resources. For example:
```ts
const policy = new BucketPolicy(this, 'MyBucketPolicy');
const bucket = new Bucket(this, 'MyBucket', { policy });
const lambda = new lambda.Function(this, 'Lambda', { /* ... */ });
const bucket = new Bucket(this, 'MyBucket');
bucket.grantReadWrite(lambda.role);
```
Will give the Lambda's execution role permissions to read and write
from the bucket.
### Buckets as sources in CodePipeline

@@ -78,0 +86,0 @@

@@ -38,3 +38,8 @@ import { Test } from 'nodeunit';

};
'website configuration': {
'only index doc'(test: Test): void;
'fails if only error doc is specified'(test: Test): void;
'error and index docs'(test: Test): void;
};
};
export = _default;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc