Skip to content

Latest commit

 

History

History
51 lines (44 loc) · 1.35 KB

s3-bucket.README.md

File metadata and controls

51 lines (44 loc) · 1.35 KB

S3 Bucket nested stack

To use this stack you will need to set the required input parameters and include the stack as a resource.

Example input definition

    "StacksVersion": {
      "Description": "Version of the Nubis Stacks",
      "Type": "String",
      "Default": "v1.0.0"
    },

Example resource definition

    "S3Stack": {
      "Type": "AWS::CloudFormation::Stack",
      "Properties": {
        "TemplateURL": { "Fn::Join": [ "/", [ "https://s3.amazonaws.com/nubis-stacks", { "Ref": "StacksVersion" }, "s3-bucket.template" ] ] },
        "TimeoutInMinutes": "60",
        "Parameters": {
          "ServiceName": {
            "Ref": "ServiceName"
          },
          "Environment": {
            "Ref": "Environment"
          },
          "BucketName": {
            "Ref": "BucketName"
          },
          "TechnicalOwner": {
            "Ref": "TechnicalOwner"
          },
          "AccessControl": "PublicRead"
        }
      }
    }

Notes

If you enable encryption on the bucket "Encryption": "true" you will need to upload files to your S3 bucket by passing the awscli a special flag

aws s3api put-object --server-side-encryption AES256 --bucket <bucket name> --key <File name on S3> --body <Local path to file>

Alternatively

aws s3 cp --sse <local file path> s3://<bucket name>