Create Object in Amazon S3 using Mule ESB
-
Upload
sanjeet-pandey -
Category
Technology
-
view
77 -
download
0
Transcript of Create Object in Amazon S3 using Mule ESB
![Page 1: Create Object in Amazon S3 using Mule ESB](https://reader035.fdocuments.in/reader035/viewer/2022071902/55c3a35dbb61eb28338b4632/html5/thumbnails/1.jpg)
www.sanjeetpandey.com
www.sanjeetpandey.com
Prepared by – Sanjeet Pandey
Create Object in Amazon S3 using Mule ESB
![Page 2: Create Object in Amazon S3 using Mule ESB](https://reader035.fdocuments.in/reader035/viewer/2022071902/55c3a35dbb61eb28338b4632/html5/thumbnails/2.jpg)
www.sanjeetpandey.com
Overview
- MuleSoft provides the most widely used integration platform to connect any application, data service or API, across the cloud and on-premise continuum.
- Amazon S3 is cloud-based data-storage infrastructure that is accessible to the user programmatically via a MuleSoft Amazon S3 connector.
- The Amazon S3 Mule connector allows developers to access any amount of data, at any time, from anywhere on the web. With connectivity to the Amazon S3 API, users can interface Amazon S3 to store objects, download and use data with other AWS services, and build applications that call for internet storage - all from within MuleSoft Anypoint Platform.
2
![Page 3: Create Object in Amazon S3 using Mule ESB](https://reader035.fdocuments.in/reader035/viewer/2022071902/55c3a35dbb61eb28338b4632/html5/thumbnails/3.jpg)
www.sanjeetpandey.com
Prerequisites
• Amazon Account • Amazon Access and Secret keys• Mule Anypoint Amazon Connector
Creating Amazon S3 Bucket - Before you start integrating S3, you need to create an S3 Bucket. Every object in Amazon S3 is stored in a bucket. Follow below steps to create a bucket:
• Enter a bucket name in the ‘Bucket Name’ field• In the Region box, select a region• If you want to setup-logging, then click on ‘Set Up Logging’, Else, go to ‘Create‘ to create the
bucket
3
![Page 4: Create Object in Amazon S3 using Mule ESB](https://reader035.fdocuments.in/reader035/viewer/2022071902/55c3a35dbb61eb28338b4632/html5/thumbnails/4.jpg)
www.sanjeetpandey.com
Amazon Access and Secret keys
You can retrieve your access key and secret key from your Amazon account page:
4
![Page 5: Create Object in Amazon S3 using Mule ESB](https://reader035.fdocuments.in/reader035/viewer/2022071902/55c3a35dbb61eb28338b4632/html5/thumbnails/5.jpg)
www.sanjeetpandey.com
Mule Anypoint Amazon S3 Connector
Configuration: This element must be placed outside of your flows and at the root of your Mule application. You can create as many configurations as you deem necessary as long as each carries its own name.
Connection Pool : S3 connector offers automatic connection management via the use of a connection pool. The pool will act a storage mechanism for all the connections that are in-use by the user of this connector.
Reconnection Strategies : Reconnection Strategies specify how a connector behaves when its connection fails. You can control how Mule attempts to reconnect by specifying a number of criteria
5
![Page 6: Create Object in Amazon S3 using Mule ESB](https://reader035.fdocuments.in/reader035/viewer/2022071902/55c3a35dbb61eb28338b4632/html5/thumbnails/6.jpg)
www.sanjeetpandey.com
Mule flow
• Steps to be followed for integrating 'Amazon S3' with MuleSoft Applications:• Install the Amazon S3 Connector in Anypoint Studio (3.5 and above)
http://repository.mulesoft.org/connectors/releases/3.5 • Create a new Anypoint Studio Project and Flow.• Before using the Amazon S3 Connector in the Mule Flows, create a global element for
Amazon S3 configuration which can be reused in all other flows across the Mule project - wherever the objects are created & deleted to & from Amazon S3 cloud server.
6
![Page 7: Create Object in Amazon S3 using Mule ESB](https://reader035.fdocuments.in/reader035/viewer/2022071902/55c3a35dbb61eb28338b4632/html5/thumbnails/7.jpg)
www.sanjeetpandey.com
Mule Flow (cont.)
• Configure the Amazon S3 connector by providing the following information for the global
element – Access Key – Secret Key
• Use HTTP outbound endpoint to pass the object location to get the object and upload to the Amazon S3 storage server
• Configure the Amazon S3 endpoint by providing the following to create the object under Amazon S3 bucket – link to the ‘global Connector Configuration’– Operation– Bucket Name– ACL (Access level)
7
![Page 8: Create Object in Amazon S3 using Mule ESB](https://reader035.fdocuments.in/reader035/viewer/2022071902/55c3a35dbb61eb28338b4632/html5/thumbnails/8.jpg)
www.sanjeetpandey.com
Mule Flow (cont.)
Mule XML -
8
![Page 9: Create Object in Amazon S3 using Mule ESB](https://reader035.fdocuments.in/reader035/viewer/2022071902/55c3a35dbb61eb28338b4632/html5/thumbnails/9.jpg)
www.sanjeetpandey.com 9