HOW TO DEPLOY MOBILE APP BUILD ARTIFACTS AUTOMATICALLY TO AMAZON S3 WITH APPCIRCLE
Published: 2021-06-25 14:16:34

<a href="https://appcircle.io/blog/how-to-deploy-mobile-app-build-artifacts-automatically-to-amazon-s3-with-appcircle/" link rel="canonical" ><img src="https://appcircle.io/wp-content/uploads/2020/09/appcircleamazon-845x321.png.webp"></a>

Reading Time: 3 minutes

[Appcircle](https://appcircle.io/) is a mobile CI/CD platform that provides a fully automated environment to build and deploy apps, which also supports Amazon Simple Storage Service (S3) for deploying any build artifacts automatically to an S3 bucket.

Appcircle supports the full lifecycle of mobile app projects for all CI/CD needs. In this article, we will be setting up Amazon S3 uploads for our builds. Any file or folder within the build environment can be deployed along with support for dynamic paths through environment variables.

Manage your mobile CI, CD and CT (continuous testing) with Appcircle

[Start for Free](https://appcircle.io/start)

Adding Amazon S3 Upload Step to the Build Workflow
--------------------------------------------------

Amazon Simple Storage Service (S3) is an object storage service provided by AWS. It can be used to store build artifacts for various use cases. With the "File Upload to Amazon S3" step in Appcircle, you can directly upload any file or folder during the build to the specified Amazon S3 bucket.

To start, add the "File Upload to Amazon S3" step to the workflow from the [workflow marketplace](https://docs.appcircle.io/workflows/why-to-use-workflows#workflow-marketplace). You can add it anywhere within the workflow and multiple times as needed to upload specific files or folders. For instance, you can add it after the build step to deploy the build outputs.

[![](https://appcircle.io/wp-content/uploads/2020/09/Appcircle-Amazon-S3-Upload-Workflow.png)](https://appcircle.io/wp-content/uploads/2020/09/Appcircle-Amazon-S3-Upload-Workflow.png)

Configuring the Amazon S3 Upload Step in the Workflow
-----------------------------------------------------

Once added, press save to exit the workflow edit mode and click on the Amazon S3 step.\
The input values are as follows:

-   AWS Input File Path: This is the file/folder name to be uploaded to S3. You can specify the full path or you can specify the output of another step an environment variable. (e.g.
-   $AC_ARCHIVE_PATH allows you to upload the output of the Xcode Build for Devices step)
-   AWS Access Key ID: Enter the AWS access key ID. [For more information, you can refer here.](https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html#access-keys-and-secret-access-keys)
-   AWS Secret Access Key: Enter the secret access key associated with the ID entered above. [For more information, you can refer here.](https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html#access-keys-and-secret-access-keys)
-   AWS Bucket Name: Enter the S3 bucket name as the deployment target.
-   AWS Bucket Region: Enter the AWS region where the specified bucket resides. [You can find the endpoint codes for the regions here.](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints)

It is highly recommended to add the keys as [secret environment variables](https://docs.appcircle.io/environment-variables/managing-variables#adding-key-and-text-based-value-pairs) instead of typing them here for security purposes.

As for the output, the specified files and the folders are deployed to a newly created directory as `s3://bucket-name/timestamp` to avoid any conflicts and potential overwrites.

[![](https://appcircle.io/wp-content/uploads/2020/09/Appcircle-Amazon-S3-Upload-Config.png.webp)](https://appcircle.io/wp-content/uploads/2020/09/Appcircle-Amazon-S3-Upload-Config.png)

Running the Amazon S3 Upload Step in the Build
----------------------------------------------

After you save your settings, you can [run the build automatically with the triggers or run it manually](https://docs.appcircle.io/build/build-manually-or-with-triggers) and the step will be executed accordingly. You can view the details of the upload operation in the build logs:

[![](https://appcircle.io/wp-content/uploads/2020/09/Appcircle-Amazon-S3-Upload-Progress.png)](https://appcircle.io/wp-content/uploads/2020/09/Appcircle-Amazon-S3-Upload-Progress.png)

You can then find your successfully uploaded files in your Amazon S3 bucket.

With Appcircle, you can automate the full lifecycle of your mobile app with continuous integration, continuous delivery and continuous testing.

[Start Using Appcircle Now](https://appcircle.io/start)