Skip to content

app/aws/s3

region - string

The region where the S3 bucket resides.

artifacts_bucket_name - string

The name of the S3 Bucket that holds the versioned code for the static site.

Format: arn:aws:s3:[region]:[account-id]:[bucket-name]

artifacts_key_template - string

A template string used to create directories named by the app version in the S3 bucket.

The Nullstone CLI replaces {{app-version}} with the version specified when pushing new artifacts.

Typical: {{app-version}}/

deployer - object

An AWS IAM user and access keys with explicit access to upload content to the s3 bucket. Additionally, The IAM user needs to have access to update the CDN for the purpose of pointing the CDN at different versions of assets.

Format

value = {
    name       = aws_iam_user.deployer.name
    access_key = aws_iam_access_key.deployer.id
    secret_key = aws_iam_access_key.deployer.secret
}
value = {
    name       = aws_iam_user.deployer.name
    access_key = aws_iam_access_key.deployer.id
    secret_key = aws_iam_access_key.deployer.secret
}

Required IAM permissions

[s3-arn]
    s3:ListBucket
    s3:GetBucketLocation
[s3-arn]/*
    s3:PutObject
    s3:GetObject
    s3:DeleteObject
[cdn-arn]
    cloudfront:GetDistribution
    cloudfront:UpdateDistribution
    cloudfront:CreateInvalidation
[s3-arn]
    s3:ListBucket
    s3:GetBucketLocation
[s3-arn]/*
    s3:PutObject
    s3:GetObject
    s3:DeleteObject
[cdn-arn]
    cloudfront:GetDistribution
    cloudfront:UpdateDistribution
    cloudfront:CreateInvalidation

cdn_ids - list(string)

A list of Cloudfront Distribution IDs that serve the S3 content.