mirror of
https://github.com/serverless/serverless.git
synced 2026-01-18 14:58:43 +00:00
Removed AWS S3 versioning and fixed build error for Node 4.4.
This commit is contained in:
parent
3ed18cfb89
commit
2e85b52bce
@ -66,7 +66,8 @@ The Serverless Framework translates all syntax in `serverless.yml` to a single A
|
||||
```
|
||||
|
||||
* You can specify your own S3 bucket which should be used to store all the deployment artifacts.
|
||||
The `deploymentBucket` config which is nested under `provider` lets you e.g. set the `name` or the `serverSideEncryption` method for this bucket
|
||||
The `deploymentBucket` config which is nested under `provider` lets you e.g. set the `name` or the `serverSideEncryption` method for this bucket. If you don't provide your own bucket, Serverless
|
||||
will create a bucket which uses default AES256 encryption.
|
||||
|
||||
* You can specify your own S3 prefix which should be used to store all the deployment artifacts.
|
||||
The `deploymentPrefix` config which is nested under `provider` lets you set the prefix under which the deployment artifacts will be stored. If not specified, defaults to `serverless`.
|
||||
|
||||
@ -5,9 +5,6 @@
|
||||
"ServerlessDeploymentBucket": {
|
||||
"Type" : "AWS::S3::Bucket",
|
||||
"Properties" : {
|
||||
"VersioningConfiguration": {
|
||||
"Status": "Enabled"
|
||||
},
|
||||
"BucketEncryption": {
|
||||
"ServerSideEncryptionConfiguration": [
|
||||
{
|
||||
|
||||
@ -54,30 +54,27 @@ module.exports = {
|
||||
});
|
||||
}
|
||||
|
||||
const mergeProperties = [];
|
||||
|
||||
if (isS3TransferAccelerationEnabled && isS3TransferAccelerationSupported) {
|
||||
// enable acceleration via CloudFormation
|
||||
mergeProperties.push({
|
||||
AccelerateConfiguration: {
|
||||
AccelerationStatus: 'Enabled',
|
||||
},
|
||||
});
|
||||
Object.assign(this.serverless.service.provider.compiledCloudFormationTemplate
|
||||
.Resources.ServerlessDeploymentBucket.Properties, {
|
||||
AccelerateConfiguration: {
|
||||
AccelerationStatus: 'Enabled',
|
||||
},
|
||||
});
|
||||
// keep track of acceleration status via CloudFormation Output
|
||||
this.serverless.service.provider.compiledCloudFormationTemplate
|
||||
.Outputs.ServerlessDeploymentBucketAccelerated = { Value: true };
|
||||
} else if (isS3TransferAccelerationDisabled && isS3TransferAccelerationSupported) {
|
||||
// explicitly disable acceleration via CloudFormation
|
||||
mergeProperties.push({
|
||||
AccelerateConfiguration: {
|
||||
AccelerationStatus: 'Suspended',
|
||||
},
|
||||
});
|
||||
Object.assign(this.serverless.service.provider.compiledCloudFormationTemplate
|
||||
.Resources.ServerlessDeploymentBucket.Properties, {
|
||||
AccelerateConfiguration: {
|
||||
AccelerationStatus: 'Suspended',
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
Object.assign(this.serverless.service.provider.compiledCloudFormationTemplate
|
||||
.Resources.ServerlessDeploymentBucket.Properties, ...mergeProperties);
|
||||
|
||||
const coreTemplateFileName = this.provider.naming.getCoreTemplateFileName();
|
||||
|
||||
const coreTemplateFilePath = path.join(this.serverless.config.servicePath,
|
||||
|
||||
@ -112,9 +112,6 @@ describe('#generateCoreTemplate()', () => {
|
||||
).to.be.deep.equal({
|
||||
Type: 'AWS::S3::Bucket',
|
||||
Properties: {
|
||||
VersioningConfiguration: {
|
||||
Status: 'Enabled',
|
||||
},
|
||||
BucketEncryption: {
|
||||
ServerSideEncryptionConfiguration: [
|
||||
{
|
||||
@ -170,9 +167,6 @@ describe('#generateCoreTemplate()', () => {
|
||||
AccelerateConfiguration: {
|
||||
AccelerationStatus: 'Suspended',
|
||||
},
|
||||
VersioningConfiguration: {
|
||||
Status: 'Enabled',
|
||||
},
|
||||
BucketEncryption: {
|
||||
ServerSideEncryptionConfiguration: [
|
||||
{
|
||||
@ -199,9 +193,6 @@ describe('#generateCoreTemplate()', () => {
|
||||
expect(template.Resources.ServerlessDeploymentBucket).to.be.deep.equal({
|
||||
Type: 'AWS::S3::Bucket',
|
||||
Properties: {
|
||||
VersioningConfiguration: {
|
||||
Status: 'Enabled',
|
||||
},
|
||||
BucketEncryption: {
|
||||
ServerSideEncryptionConfiguration: [
|
||||
{
|
||||
|
||||
@ -74,9 +74,6 @@ describe('mergeCustomProviderResources', () => {
|
||||
FakePropKey: 'FakePropValue',
|
||||
},
|
||||
Properties: {
|
||||
VersioningConfiguration: {
|
||||
Status: 'Enabled',
|
||||
},
|
||||
BucketEncryption: {
|
||||
ServerSideEncryptionConfiguration: [
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user