Return to site

Amazon S3 Browser

broken image


  • This article explains how to setup your Amazon Web Services (AWS) environment so you can run a sample application that showcases the usage of AWS Simple Storage Service (S3), directly from your web application's client-side (browser) code.

What is Amazon S3?

Amazon S3 is a cloud-based file storage service from Amazon.

  1. With S3 Browser you can download large files from Amazon S3 at the maximum speed possible, using your full bandwidth! This is made possible by a new feature called Multipart Downloads. Now S3 Browser breaks large files into smaller parts and download them in parallel, achieving significantly higher downloading speed.
  2. Download Portable S3 Browser - Simple alternative for handling content available in Amazon S3 cloud storage through an easy to work with interface and powerful rich list of options.

Why would I want to use S3 in my web application?

S3 is very affordable, fast, and reliable. Since S3 is just like a file-system on your computer, it can store any text/binary data, including photos and documents. Photos & documents would be a prime candidate for S3 as they are simple binary data, they can be large, and they can be transferred directly to S3 without needing to interact with your server-side programs.

The S3 Browser is a way for Amazon's S3 cloud storage users to access the information whenever you need, all with the click of a button. It was designed to be a free file managing option for S3, also known as Amazon 's Simple Storage Service, and it offers a web-based solution to store and access your business' sensitive data. Amazon S3 Browser for Mac, Linux and Windows. ExpanDrive is a fast and powerful Amazon S3 client that lets you browse S3 (or S3-compatible) storage. It builds native access to S3 directly into Finder and your Mac system at the filesystem level.

Pre-requisites

You'd need to install the Integration Library package using the LANSA Package Manager.
See this usage guide for how to use the LANSA Package Manager.

Running the Sample Application

Once you have installed the Integration Library package, go to the Installed Packages section, and then the Samples tab.
Run the Amazon Simple Storage Services (S3) – Browser Direct Upload & Download sample application.

Signing Up with AWS

Unless you have an account already with AWS, you'd need to sign up for a new account. You'd need to provide a credit card, however you also get 12 months of free tier access. Just make sure that you only use services that are included in the free tier.

Go to https://aws.amazon.com/free for full offer terms.

To sign in or sign up, go to https://aws.amazon.com.

  • While LANSA makes its best effort to make sure that the services mentioned in this guide is included in the AWS free tier, LANSA makes no guarantee that you won't be charged by Amazon.
  • Following steps in this guide may result in Amazon charging your credit card.
  • LANSA is not responsible for any charges incurred as a result of following the steps in this guide.
  • It's your responsibility to monitor your AWS resource usage, making sure that they are within the allowance allocated in the free tier.

Understanding AWS Root User

When you created your AWS account, you begin with a single sign-in identity that has complete access to all AWS resources in the account, including billing. This identity is called the AWS account root user and is accessed by signing into the AWS Console, with the email address and password that you used to create the account.
Since the root user has unlimited access to your account, it's best to create a set of secondary accounts that have just the minimum required permissions to
do their job. These non-root users are created via the Identity and Access Management service of AWS, so they are
called IAM users.

At a a minimum, you should create an IAM user that functions as an administrator.
You may want to create other IAM users for different purposes, for example for access via the AWS Command Line Interface (CLI).
You want also want to create another IAM user that you would use to programmatically access the S3 service from your programs.

Have a look at this AWS guide for more information.

Creating a New Administrator IAM User

Have a look at this AWS guide

Understanding LANSA Cloud Middleware

In order to use some AWS services, such as direct transfer of files between AWS S3 (Simple Storage Service) and the browser,
you'd need to deploy the LANSA Cloud Middleware to AWS. They will be installed as AWS Lambda (serverless).
The LANSA Cloud Middleware is basically a set of helper services that facilitates the use of
AWS services from your LANSA RDML programs. Go to google chrome.

Note that LANSA Cloud Middleware is provided as-is and free-of-charge.
LANSA does not provide any form of support for the LANSA Cloud Middleware. Any questions and comments about the LANSA Cloud Middleware
should go to the Visual LANSA Forum.

Installing the AWS CLI (Command Line Interface)

You'd need the AWS CLI to deploy the LANSA Cloud Middleware to AWS.

Download the CLI from here:
https://aws.amazon.com/cli/

Creating New IAM User for API Invocation

You'd need to create 2 set of users and access keys:

  • For use with the command line interface (CLI)
  • For API invocation from your RDML code

To keep things simple in this guide, you can reuse the same IAM administrator user you created earlier with CLI use,
so you'd just need to create a new user for AWS API invocation from your RDML code.
In a real environment however, we'd recommend that you create a separate user for CLI use.

To minimise security risk, remember to always assign the minimum required permission to the users.

We'll now create a new API user.

Go to the AWS Management Console.
Search for IAM in the search box:


In the first screen, enter the user id (e.g. api-user), and tick the
Programmatic access checkbox.

Click the Next button.
In this screen, you will add a permission to the user. There are a couple of ways to add permission,
one of the easiest is to attach one (or more) built-in policy to the user.
In this guide, we need the user to be able to access the Simple Storage Services (S3), so we
will add the S3 Full Access policy to the user.

Amazon S3 Browser

Click the Next: Tags button to go to the next screen (Tags).
We are not going to add any tags so click on the Next: Review button.

Click on the Create User button. You have successfully added a new user.


Make sure that you download the CSV or save the secret access key as you won't be able to view the secret access key associated with this key ID after this.
You can however create a new pair of key ID and secret access key easily, so it's not a big problem if you lose your keys.

Creating Access Key for Your CLI User

Since we are using the same IAM user we use to administer via the console, we need to create an access key so we can use that same user from the CLI.

Go to the IAM, click on Users, and then
click on the user you want to use.

Go to the Security credentials tab
Click on the Create access key button.
Download the CSV file containing the new access key, or copy and paste the secret key into a text file.

Setup Your CLI with the New Access Key

You still need to configure your CLI as it needs to know the credentials (access key) to use when communicating with AWS.
On the command prompt, type in the following command:

> aws configure

Enter the following information:

  • Access key ID
    Enter the access key ID you obtained in the earlier step.
  • Secret access key
    Enter the secret access key you obtained in the earlier step.
  • Default region name
    Enter a region you'd use the most. If unsure, just enter us-east-1
  • Default output format
    Enter json

Your CLI is now ready to use.

Windows S3 Client

Creating an S3 Bucket for LANSA Cloud Middleware Deployment

Deployment requires an S3 bucket where AWS can temporarily put the ZIP file containing the files to be deployed.
You can delete the files in this bucket after deployment is finished.

First, go to the AWS Management Console.
Type in S3 in the search box.
Enter bucket name (e.g. deploy-bucket) and region.

Bucket name must be unique across the whole AWS, so use your company name as a prefix or suffix.


Just click on the Next button on this screen.


This screen is where set the public access permission for the objects created in this bucket.
Unless you want to allow public access, make sure you tick the Block all public access checkbox.


You are now on the last screen (review). Click on the Create bucket button.

You now have succesfully created a new S3 bucket.

Deploying the LANSA Cloud Middleware to AWS

Now that you have your CLI setup with the right credentials, you can deploy
the LANSA Cloud Middleware to AWS.

First download the LANSA Cloud Middleware for AWS.

Open PowerShell, and change the current directory to where you downloaded the ZIP file.

Run the following command to unzip:

Expand-Archive -Path lansa-cloud-middleware.zip -DestinationPath lansa-cloud-middleware

Change the current directory into ./lansa-cloud-middleware/deploy-aws, by running the following command:

cd ./lansa-cloud-middleware/deploy-aws

Run the deploy.ps1 script:

./deploy

Configuring Your LANSA Runtime Environment with Your AWS Access Keys and Cloud Middleware URL

Amazon S3 Browser For Mac

Open the Integration Services Configuration application and navigate to API Providers >> Amazon Web Services

If the app does not open, you may not have it installed.

Use the LANSA Package Manager to install the Integration Services package.

Once installed, you can also launch the Integration Services Configuration application from the LANSA Package Manager.

Once you have the package installed, go to the Installed Package tab (at the top-left),
then choose the Tools sub-tab.
You will see the Configure Integration Services application listed there.

You should now see the configuration app.
Expand the Providers API menu, then click on Amazon Web Services.

You will be presented with the AWS API configuration screen.

Fill up the access key details, default region,
and the Cloud Middleware URL you obtained from the earlier step
(deployment to AWS using deploy.ps1PowerShell script).

You are ready to run the example!

You should now be able to run the S3 Simple Upload/Download Example,
either from the LANSA Package Manager,
or directly from the IDE. If you are running from the IDE, the entry point
webpage is xDemoAwsS3SimpleUploadDownload (XEX00065).

Amazon S3 Browser Download

S3 Storage Lens delivers organization-wide visibility into object storage usage, activity trends, and makes actionable recommendations to improve cost-efficiency and apply data protection best practices. S3 Storage Lens is the first cloud storage analytics solution to provide a single view of object storage usage and activity across hundreds, or even thousands, of accounts in an organization, with drill-downs to generate insights at the account, bucket, or even prefix level. S3 Storage Lens analyzes organization-wide metrics to deliver contextual recommendations to find ways to reduce storage costs and apply best practices on data protection.

After you activate S3 Storage Lens in the S3 Console, you will receive an interactive dashboard containing pre-configured views to visualize storage usage and activity trends, with contextual recommendations that make it easy to take action. You can also export metrics in CSV or Parquet format to an S3 bucket. You can use the summary view, cost efficiency view, or the data protection view to see metrics related to your intended use case. In addition to the dashboard in the S3 console, you can export metrics in CSV or Parquet format to an S3 bucket of their choice for further use.

Visit the S3 Storage Lens page to learn more.





broken image