Skip to main content

Publish directly to an Amazon S3 or SFTP location

If you use Amazon servers to host your Shorthand stories you can sync up your Shorthand account to push directly to a bucket on that server – removing the need to manually download and upload or export files.

SFTP works almost exactly the same way, except instead of using S3, you enter the SFTP details of your own server. This is useful if you have your own server infrastructure and do not use S3.

Note: This feature is available only on some plans. To discuss adding this feature, please get in touch.

Setup

The workspace owner can set up the hosting via the Workspace Settings page.

Under 'Publishing' click to 'Add a new publishing configuration'.

Here you will need to enter:

  • PROVIDER (S3)

  • NAME - This is what users will see when choosing to publish to this host

  • ACCESS KEY - The AWS account ACCESS KEY

  • BUCKET NAME - The bucket the story will be published to (you can also put subdirectories in here to publish to a subfolder within the bucket)

  • SECRET KEY - The AWS account SECRET KEY

  • S3 REGION - The region that the S3 bucket was created with

  • URL BASE PATH - (Only used to provide a quick link to the published story).
    The URL that the S3 Bucket corresponds to, with a trailing slash (e.g. http://s3-ap-southeast-1.amazonaws.com/bucket/ or http://shorthand.myorganisation.com/). For more information setting up S3 custom URLs, please see here

  • ALLOW PUBLIC READ ACCESS - Defaults to true; Allows published story files to be publicly accessible in your chosen S3 bucket such as using an S3 hosting website. Disable if you want to secure it with CloudFront and CloudFront Origin Access Identity. For more information, please see the Amazon S3 documentation

  • API ONLY - To hide the publishing configuration from the publish page and restrict its use for API publishing only

  • AWS KMS ARN - The AWS KMS ARN is only needed if you are using S3 bucket server-side encryption with AWS Key Management Service (SSE-KMS). For more information, please refer to Specifying KMS Encryption with AWS

Once set up, a workspace owner can enable the server as a publishing option per-team, and a team leader can choose to enable individual team members to publish to that location. See these support pages for more info on managing team publishing:

Publishing to the server can then be achieved with the 'Publish' button in the story editor without the need to download a ZIP folder or export files.

Note: Your bucket must be configured to 'enable website hosting', and also be set up with a bucket policy that allows your AWS credentials to push details. This policy will follow the pattern outlined below (replace anything within []):

{ 	
  "Version": "2008-10-17", 	
  "Statement": [
    { 			
      "Sid": "PublicReadForGetBucketObjects",
      "Effect": "Allow",
      "Principal": { "AWS": "*" },
      "Action": "s3:GetObject",
      "Resource": "arn:aws:s3:::[BUCKET_NAME]/*"
    },
    {
      "Sid": "",
      "Effect": "Allow",
      "Principal": { "AWS": "arn:aws:iam::[IAM_DETAILS]" },
      "Action": "s3:*",
      "Resource": [
        "arn:aws:s3:::[BUCKET_NAME]",
        "arn:aws:s3:::[BUCKET_NAME]/*"
      ]
    }
  ] 
} 

To publish your story to your S3 or SFTP location:

  1. Find the story on your Shorthand dashboard

  2. Click Edit

  3. In the story editor, click Publish

  4. Choose the publishing option that shows your S3 or SFTP location

  5. Enter a directory name for the story. This will be part of the URL at which the story and its assets are hosted. A lowercase, underscore-separated version of the story title is good choice ( eg the_feature_story_of_the_year ). You will be shown the full URL that you can use to link to your story.

  6. Click Publish

Your story will now be available at the URL shown.

Did this answer your question?