Skip to content

Commit d2bc81b

Browse files
committed
enabling deletion of bucket contents
1 parent 7415952 commit d2bc81b

File tree

3 files changed

+4
-10
lines changed

3 files changed

+4
-10
lines changed

Diff for: cloudformation/template.yml

+2-8
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,11 @@ Resources:
1010
- python3.6
1111
- python3.7
1212
Description: S3 Deployment Layer
13+
LayerName: !Ref AWS::StackName
1314
LicenseInfo: MIT
1415
ContentUri: ../build
1516
RetentionPolicy: Retain
1617

17-
DeploymentPermission:
18-
Type: AWS::Lambda::LayerVersionPermission
19-
Properties:
20-
Action: lambda:GetLayerVersion
21-
LayerVersionArn: !Ref S3DeploymentLayer
22-
Principal: '*'
23-
2418
Outputs:
2519
Arn:
2620
Value: !Ref S3DeploymentLayer
@@ -37,5 +31,5 @@ Metadata:
3731
ReadmeUrl: README-SAR.md
3832
Labels: ['deploy', 's3', 'lambda', 'layer', 'frontend']
3933
HomePageUrl: https://serverless.pub/deploy-frontend-to-s3-and-sar/
40-
SemanticVersion: 2.4.0
34+
SemanticVersion: 2.4.1
4135
SourceCodeUrl: https://github.com/serverlesspub/cloudformation-deploy-to-s3

Diff for: example/template.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Resources:
1414
Properties:
1515
Location:
1616
ApplicationId: arn:aws:serverlessrepo:us-east-1:375983427419:applications/deploy-to-s3
17-
SemanticVersion: 2.4.0
17+
SemanticVersion: 2.4.1
1818

1919

2020
# this function is used only during deployment,

Diff for: src/deployer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def resource_handler(event, context):
3030
print('uploading')
3131
upload(lambda_src, target_bucket, acl, cacheControl)
3232
elif event['RequestType'] == 'Delete':
33-
print('delete')
33+
delete(lambda_src, target_bucket, s3)
3434
else:
3535
print('ignoring')
3636

0 commit comments

Comments
 (0)