Setup Instructions for Developers
Amazon Standard SDKs
- If you don't already have an AWS Account, go to Sign In or Create an AWS Account. Select "Create an AWS Account" and follow the instructions to create and configure your AWS account.
Setup AWS Credentials
Create IAM User
The IAM user will be used to put and get objects from the AWS Bucket
- Open the IAM console.
- From the navigation menu, select your username and select My Security Credentials
- Select the Access keys tab
- Click the Create New Access Key button to generate Access key ID and Secret access key
- Access key ID example: AKIAIOSFODNN7EXAMPLE
- Secret access key example: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
Add AWS Credentials and Default Region to your machine
Either add your credentials and default region to your environment or set them in the
.aws directory in your HOME.
Adding the keys and region to your .aws directory
Create .aws/ folder and credentials file if needed
~/.aws/credentialson Linux, macOS, or Unix
In the credentials file, enter the following:
[default] aws_access_key_id = your_access_key_id aws_secret_access_key = your_secret_access_key
Create .aws/config and enter the following replacing
your_default_region with the region you wish to use:
Adding the keys and region to your env
your_secret_access_key with the keys created for the IAM user and
your_default_region with the region you wish to use for IPCS S3.
Build the Project
To build and install the Ionic S3 sdk
To build the IonicS3SampleApp from ./examples
After the build, a fat JAR of the sample app is produced at
Ensure that your Ionic device credentials can be located at
The user can run the program from /awss3examples with either "put" or "get" commands with usage as follows:
./run.sh putString <bucketName> <objectKey> <objectContent> [<metadata>]
./run.sh putFile <bucketName> <objectKey> <filePath> [<metadata>]
./run.sh putMultipart <bucketName> <objectKey> <file> <partsize_mb> [<metadata>]
./run.sh getFile <bucketName> <objectKey> <destinationPath>
./run.sh getString <bucketName> <objectKey>Windows users should use ./run.bat instead
Note: S3SampleApp does not protect against invalid entry of AWS S3 bucket names or Object Keys Current Rules for naming S3 buckets can be found at: https://docs.aws.amazon.com/AmazonS3/latest/dev//BucketRestrictions.html#bucketnamingrules Current Rules for specifying Object Keys can be found at: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html#object-keys
Using the Library
Developer documentation for this library can be found at https://dev.ionic.com/integrations/aws-s3.
The JAR for use here is produced in
./target/, such as
This JAR is thin, and needs the Ionic SDK and the AWS SDKs available during builds that use it.