Copies files to an Amazon S3 bucket
Input Schema
| Property | Type | Description | Required |
|---|---|---|---|
| accountId | string | The AWS account ID to create the resource. | |
| region | string | The AWS region to create the resource. | |
| bucketName | string | Name of the Amazon S3 bucket. | |
| path | string | File pattern to copy to the bucket | |
| prefix | string | Amazon S3 bucket prefix to add to the files. |
Output Schema
Usage Examples
Upload a static site build to an S3 website bucket
Copies the build output of a single page application to an S3 bucket under a service specific prefix. Use this after fetching and generating the app with fetch:template.
steps:
- id: fetch-template
action: fetch:template
input:
url: ./template
targetPath: .
values:
serviceName: ${{ parameters.serviceName }}
owner: ${{ parameters.owner }}
- id: upload-site
action: aws:s3:cp
input:
bucketName: acme-websites-prod
region: us-east-1
path: build/**
prefix: sites/${{ parameters.serviceName }}/Push service configuration files to a central config bucket
Copies only YAML config files to a shared configuration bucket using a service scoped prefix. Use this to distribute runtime configuration after template generation with fetch:template.
steps:
- id: fetch-config-template
action: fetch:template
input:
url: ./config-template
targetPath: .
values:
serviceId: ${{ parameters.serviceId }}
environment: ${{ parameters.environment }}
- id: upload-config
action: aws:s3:cp
input:
bucketName: acme-config-prod
region: us-west-2
path: config/*.yaml
prefix: services/${{ parameters.serviceId }}/config/${{ parameters.environment }}/Cross account upload of build artifacts to a staging bucket
Copies compiled artifacts to an S3 bucket in a different AWS account and region. Use this to deliver builds to a centralized staging account after preparing sources with fetch:template.
steps:
- id: fetch-app
action: fetch:template
input:
url: ./app-template
targetPath: .
values:
name: ${{ parameters.name }}
buildId: ${{ parameters.buildId }}
- id: upload-artifacts-staging
action: aws:s3:cp
input:
accountId: "123456789012"
region: eu-west-1
bucketName: acme-staging-artifacts
path: dist/**
prefix: apps/${{ parameters.name }}/builds/${{ parameters.buildId }}/Publish generated documentation to an S3 techdocs bucket
Copies the docs directory to a TechDocs style bucket using an owner and service prefix. Use this after assembling docs with fetch:template.
steps:
- id: fetch-docs
action: fetch:template
input:
url: ./docs-template
targetPath: .
values:
owner: ${{ parameters.owner }}
service: ${{ parameters.service }}
- id: upload-techdocs
action: aws:s3:cp
input:
bucketName: acme-techdocs
region: us-east-2
path: docs/**
prefix: techdocs/${{ parameters.owner }}/${{ parameters.service }}/Upload a versioned Helm chart package to a charts bucket
Copies a packaged Helm chart to an S3 bucket under a versioned prefix. Use this after preparing chart artifacts with fetch:template.
steps:
- id: fetch-chart
action: fetch:template
input:
url: ./helm-chart
targetPath: .
values:
chartName: ${{ parameters.chartName }}
version: ${{ parameters.version }}
- id: upload-helm-chart
action: aws:s3:cp
input:
bucketName: acme-helm-charts
region: ap-southeast-1
path: charts/${{ parameters.chartName }}-${{ parameters.version }}.tgz
prefix: helm/${{ parameters.chartName }}/${{ parameters.version }}/