Skip to content
This repository was archived by the owner on Jun 26, 2025. It is now read-only.

Commit 8be832c

Browse files
authored
Update to version v1.0.2
- Enabled Amazon S3 server access logging on logging bucket(s) using bucket policy
2 parents 9139b29 + d7b830c commit 8be832c

File tree

9 files changed

+51
-6
lines changed

9 files changed

+51
-6
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,4 @@
2727
**/.DS_Store
2828
**/.vscode
2929
source/test
30+
.idea

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [1.0.2] - 2023-05-03
8+
### Changed
9+
- Enabled Amazon S3 server access logging on logging bucket(s) using bucket policy
10+
711
## [1.0.1] - 2021-05-21
812
### Added
913
- Updated SNS Topic Display Name ([#7](https://github.com/awslabs/cognito-user-profiles-export-reference-architecture/issues/7))

deployment/cognito-user-profiles-export-reference-architecture.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -755,6 +755,7 @@ Resources:
755755
Action:
756756
- states:CreateStateMachine
757757
- states:DeleteStateMachine
758+
- states:DescribeStateMachine
758759
- states:UpdateStateMachine
759760
- states:TagResource
760761
- states:ListTagsForResource
@@ -792,6 +793,9 @@ Resources:
792793
- s3:PutBucketAcl
793794
- s3:PutBucketLogging
794795
- s3:PutBucketTagging
796+
- s3:GetBucketPolicy
797+
- s3:PutBucketPolicy
798+
- s3:DeleteBucketPolicy
795799
Resource:
796800
- !Sub arn:${AWS::Partition}:s3:::${SolutionConstantsCustomResource.UserImportJobMappingFileBucketPrefix}-${AWS::Region}
797801
- !Sub arn:${AWS::Partition}:s3:::${SolutionConstantsCustomResource.UserImportJobMappingFileBucketPrefix}-${AWS::Region}-logs

deployment/stack-set-template.yaml

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1388,7 +1388,6 @@ Resources:
13881388
- Key: solution-id-SO0126
13891389
Value: !Sub ${StackSetConstantsCustomResource.ParentStackName}-${PrimaryRegion}
13901390
BucketName: !Sub ${StackSetConstantsCustomResource.UserImportJobMappingFileBucketPrefix}-${AWS::Region}-logs
1391-
AccessControl: LogDeliveryWrite
13921391
PublicAccessBlockConfiguration:
13931392
BlockPublicAcls: True
13941393
BlockPublicPolicy: True
@@ -1399,6 +1398,43 @@ Resources:
13991398
- ServerSideEncryptionByDefault:
14001399
SSEAlgorithm: aws:kms
14011400

1401+
S3ServerAccessLogsPolicy:
1402+
Type: AWS::S3::BucketPolicy
1403+
Properties:
1404+
Bucket: !Ref UserImportJobMappingFilesLogsBucket
1405+
PolicyDocument:
1406+
Version: '2012-10-17'
1407+
Statement:
1408+
- Sid: S3ServerAccessLogsPolicy
1409+
Effect: Allow
1410+
Principal:
1411+
Service: logging.s3.amazonaws.com
1412+
Action:
1413+
- s3:PutObject
1414+
Resource:
1415+
Fn::Join: [
1416+
'', [
1417+
'arn:',
1418+
!Ref AWS::Partition,
1419+
':s3:::',
1420+
!Ref UserImportJobMappingFilesLogsBucket,
1421+
'/cupera-userimportjob*',
1422+
]
1423+
]
1424+
Condition:
1425+
ArnLike:
1426+
aws:SourceArn:
1427+
- Fn::Join: [
1428+
'', [
1429+
'arn:',
1430+
!Ref AWS::Partition,
1431+
':s3:::',
1432+
!Ref UserImportJobMappingFiles
1433+
]
1434+
]
1435+
StringEquals:
1436+
aws:SourceAccount: !Ref AWS::AccountId
1437+
14021438
CheckExecutionsLambda:
14031439
Type: AWS::Lambda::Function
14041440
Metadata:

source/custom-resources/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"name": "aws-solutions-builder"
66
},
77
"license": "Apache-2.0",
8-
"version": "1.0.1",
8+
"version": "1.0.2",
99
"private": true,
1010
"dependencies": {
1111
"axios": "^0.21.1",

source/utils/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "utils",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"description": "Custom Resource Helper functions",
55
"scripts": {
66
"clean": "rm -rf dist/ node_modules/ coverage/ package-lock.json",

source/workflow-common/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "workflow-common",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"description": "Common functionality for all Step Functions Workflows",
55
"author": {
66
"name": "aws-solutions-builder"

source/workflow-export/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"name": "aws-solutions-builder"
66
},
77
"license": "Apache-2.0",
8-
"version": "1.0.1",
8+
"version": "1.0.2",
99
"private": true,
1010
"dependencies": {
1111
"uuid": "^8.3.0"

source/workflow-import/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "workflow-import",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"description": "Populates a new user pool with user profiles, groups and group memberships from the backup table",
55
"scripts": {
66
"clean": "rm -rf dist/ node_modules/ coverage/ package-lock.json",

0 commit comments

Comments
 (0)