copilot-cli icon indicating copy to clipboard operation
copilot-cli copied to clipboard

Objects uploaded to Copilot managed S3 bucket should be encrypted

Open iamhopaul123 opened this issue 3 years ago • 1 comments
trafficstars

Due to some security constraint (e.g., AWS Organization SCP), any object uploaded to an S3 bucket must be encrypted. Copilot should either encrypt these objects by default or make it optional for users.

For example:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Action": [
                "s3:PutObject"
            ],
            "Resource": "*",
            "Effect": "Deny",
            "Condition": {
                "Null": {
                    "s3:x-amz-server-side-encryption": true
                },
                "StringNotEquals": {
                    "s3:x-amz-server-side-encryption": "aws:kms"
                }
            }
        },
        {
            "Action": "s3:*",
            "Effect": "Deny",
            "Resource": "*",
            "Condition": {
                "Bool": {
                    "aws:SecureTransport": "false"
                }
            }
        }
    ]
}

requires the object either encrypted by AES256 or any kms key.

iamhopaul123 avatar Aug 05 '22 16:08 iamhopaul123

it turns out that example SCP policy is actually very confusing, but nevertheless the issue still applies

flyinprogrammer avatar Aug 20 '22 00:08 flyinprogrammer

I have the same issue. My company enforces a global security policy on all buckets, enabling server side encryption. Hence, Copilot fails when it needs to upload something to S3, e.g.

✘ execute svc deploy: upload deploy resources for service [...]: upload custom resources for [...]: upload custom resource "DynamicDesiredCountFunction": upload manual/scripts/custom-resources/dynamicdesiredcountfunction/acd1f00a18ceccc32a780fb208be61f3f62274d775f987fd9feec37493d9173c.zip to bucket stackset-[...]-inf-pipelinebuiltartifactbuc-fp3jkjypj66y: AccessDenied: Access Denied
        status code: 403, [...]

tobiasploetz avatar Feb 01 '23 12:02 tobiasploetz

Has there been any progress on this topic? Our company also requires us to setup bucket encryption and object level encryption.

suroh1994 avatar May 31 '23 09:05 suroh1994