s3

Generates a plist file and uploads all to AWS S3

Please use the aws_s3 plugin instead.
Install using fastlane add_plugin aws_s3.

Upload a new build to Amazon S3 to distribute the build to beta testers.
Works for both Ad Hoc and Enterprise signed applications. This step will generate the necessary HTML, plist, and version files for you.
It is recommended to not store the AWS access keys in the Fastfile. The uploaded version.json file provides an easy way for apps to poll if a new update is available.

s3
Supported platforms
Author @joshdholtz

2 Examples

s3
s3(
  # All of these are used to make Shenzhen's `ipa distribute:s3` command
  access_key: ENV["S3_ACCESS_KEY"],     # Required from user.
  secret_access_key: ENV["S3_SECRET_ACCESS_KEY"], # Required from user.
  bucket: ENV["S3_BUCKET"],   # Required from user.
  ipa: "AppName.ipa",         # Optional if you use `ipa` to build
  dsym: "AppName.app.dSYM.zip",         # Optional if you use `ipa` to build
  path: "v{CFBundleShortVersionString}_b{CFBundleVersion}/", # This is actually the default.
  upload_metadata: true,      # Upload version.json, plist and HTML. Set to false to skip uploading of these files.
  version_file_name: "app_version.json",# Name of the file to upload to S3. Defaults to "version.json"
  version_template_path: "path/to/erb"  # Path to an ERB to configure the structure of the version JSON file
)

Parameters

Key Description Default
ipa .ipa file for the build *
dsym zipped .dsym package for the build *
upload_metadata Upload relevant metadata for this build true
plist_template_path plist template path
plist_file_name uploaded plist filename
html_template_path html erb template path
html_file_name uploaded html filename
version_template_path version erb template path
version_file_name uploaded version filename
access_key AWS Access Key ID *
secret_access_key AWS Secret Access Key *
bucket AWS bucket name *
region AWS region (for bucket creation) *
path S3 'path'. Values from Info.plist will be substituted for keys wrapped in {} v{CFBundleShortVersionString}_b{CFBundleVersion}/
source Optional source directory e.g. ./build
acl Uploaded object permissions e.g public_read (default), private, public_read_write, authenticated_read public_read

* = default value is dependent on the user's system


Lane Variables

Actions can communicate with each other using a shared hash lane_context, that can be accessed in other actions, plugins or your lanes: lane_context[SharedValues:XYZ]. The s3 action generates the following Lane Variables:

SharedValue Description
SharedValues::S3_IPA_OUTPUT_PATH Direct HTTP link to the uploaded ipa file
SharedValues::S3_DSYM_OUTPUT_PATH Direct HTTP link to the uploaded dsym file
SharedValues::S3_PLIST_OUTPUT_PATH Direct HTTP link to the uploaded plist file
SharedValues::S3_HTML_OUTPUT_PATH Direct HTTP link to the uploaded HTML file
SharedValues::S3_VERSION_OUTPUT_PATH Direct HTTP link to the uploaded Version file

To get more information check the Lanes documentation.


Documentation

To show the documentation in your terminal, run

fastlane action s3

CLI

It is recommended to add the above action into your Fastfile, however sometimes you might want to run one-offs. To do so, you can run the following command from your terminal

fastlane run s3

To pass parameters, make use of the : symbol, for example

fastlane run s3 parameter1:"value1" parameter2:"value2"

It's important to note that the CLI supports primitive types like integers, floats, booleans, and strings. Arrays can be passed as a comma delimited string (e.g. param:"1,2,3"). Hashes are not currently supported.

It is recommended to add all fastlane actions you use to your Fastfile.


Source code

This action, just like the rest of fastlane, is fully open source, view the source code on GitHub


Back to actions