Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

Read-S3Object : Access Denied on AD module scripts #152

Open
fortran01 opened this issue Sep 16, 2022 · 1 comment
Open

Read-S3Object : Access Denied on AD module scripts #152

fortran01 opened this issue Sep 16, 2022 · 1 comment

Comments

@fortran01
Copy link

fortran01 commented Sep 16, 2022

I am still getting the an issue in the following line. It also occurs for Module-AD.psm1.

$Null = Read-S3Object -BucketName $S3BucketName -Key "$($S3KeyPrefix)/scripts/Modules/Module-AD/$CustomModule" -File "C:\AWSQuickstart\Module-AD\$CustomModule" -Region $S3BucketRegion

This block from Module-AD.psm1 is also affected. The error looks like Failed to read and download GPO from S3 Access Denied.

        Write-Output 'Downloading GPO Zip File'
        Try {
            $Null = Read-S3Object -BucketName $S3BucketName -Key "$($S3KeyPrefix)scripts/GPOs.zip" -File 'C:\AWSQuickstart\GPOs.zip' -Region $S3BucketRegion
        } Catch [System.Exception] {
            Write-Output "Failed to read and download GPO from S3 $_"
            Exit 1
        }

It appears to be related or similar to the issue here #62.

PS C:\Windows\system32> Read-S3Object -BucketName "aws-quickstart" -Key "quickstart-microsoft-activedirectory/scripts/Modules/Module-AD/Module-AD.psd1" -File "C:\AWSQuickstart\Module-AD\Module-AD.psd1" -Region "us-east-1"
Read-S3Object : Access Denied

It works with my own custom bucket.

@fortran01
Copy link
Author

fortran01 commented Sep 20, 2022

My guess is the ACL for these objects is configured Read for "Authenticated users group (anyone with an AWS account)", instead of "Everyone (public access)".

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant