Building An Amazon S3 Client With Application Express 4

Transcription

Building an Amazon S3 Clientwith Application Express 4.0An Oracle White PaperDecember 2010Note: The following is intended to outline our general productdirection. It is intended for information purposes only, andmay not be incorporated into any contract. It is not acommitment to deliver any material, code, or functionality,and should not be relied upon in making purchasing decisions.The development, release, and timing of any features orfunctionality described for Oracle’s products remains at thesole discretion of Oracle.

Building an Amazon S3 Clientwith Application Express 4.0Terminology. 2Overview . 5Prequisites . 5Amazon S3 Technical Details . 5API’s . 5Authentication . 5Common Request HTTP Headers . 6Create the Application and Supporting Objects. 6Create Packages and Functions . 6Create the Application . 8Create an Application Item for Date Header and Computations . 8Create a Page to View All Buckets . 9Create a RESTful Web Reference to View All Buckets. 9Create a Page to View all Buckets . 10Create a Page to Create a New Bucket . 11Create the RESTful Web Service Reference . 12Create the Page . 12Create a Page to List Bucket Contents . 14Create the RESTful Web Service Reference . 14Create the Page . 15Modify Report to Provide Download Link for Objects . 16Create a Page to Upload an Object to a Bucket . 17Create the RESTful Web Service Reference . 18Create the Page . 18Add Ability to Delete an Object . 20Create the RESTful Web Service Reference . 20Modify the Report on Page 3 to Include a Delete Link . 21Create Process to Call the Delete Object Web Service Reference . 22Conclusion . 24

TERMINOLOGYS3Amazon S3 is storage for the Internet. It is designed to make web-scalecomputing easier for developers.ObjectA file and any metadata that describes the file.BucketA container for objects. Buckets can have distinct access control listsas well as distinct geographical regions.AWS AccountTo access any Amazon Web Services you must first create an AWSAccount at http://aws.amazon.com.SOAPSOAP is a simple XML-based protocol to let applications exchangeinformation over HTTP.1RESTResource oriented architecture for interacting with web services wherethe resource is described by the URI and the method is described bythe HTTP verb (GET, PUT, POST, DELETE).EpochNumber of seconds since January 1, 1970.1http://www.w3schools.com/soap/soap intro.aspBuilding an Amazon S3 Client with Application Express 4.0Page 2

Building an Amazon S3 Client with Application Express 4.0Page 3

INTRODUCTIONOracle Application Express (APEX), a feature of the Oracle Database 11g,combines rapid web application development with the power of the Oracledatabase. Application Builder features an easy-to-use browser-based interfacewhich enables developers and non-programmers to develop and deploy datadriven web applications in very little time.Oracle Application Express doesn’t depend on any client software fordeveloping or deploying web applications. Simple architecture, and browserbased features make the transition for developers and end-users seamlesssimply provide the URL for the cloud environment.The multi-tenant capabilities of Oracle Application Express allow multiple usersand their associated applications to co-exist within one Oracle Database,minimizing cost. Only one instance is needed and users work in a dedicatedwork area called a workspace. An added advantage, when you create a databasebackup you also create backup of application source. Oracle ApplicationExpress can integrate with other applications by consuming web services.Amazon Simple Storage Service (Amazon S3) provides highly available andhighly scalable Internet storage. It was designed to sustain the concurrent loss ofdata in two facilities.2 Common use cases include content storage anddistribution as well as backup and disaster recovery. Amazon S3 allows forstoring objects (files) in containers called buckets and has web service API’s toallow for S3 interactions.Oracle Application Express 4.0 introduces support for consuming RESTful webservices. RESTful web services conform to a simpler architecture thantraditional SOAP based web services. Oracle APEX 4.0’s support for consumingRESTful web services makes it possible to build a client on Amazon S3, usingits RESTful web service API.2http://aws.amazon.com/s3/Building an Amazon S3 Client with Application Express 4.0Page 4

OVERVIEWThe purpose of this white paper is to describe how to build an OracleApplication Express application that is a fully functional Amazon S3 client. Theapplication will allow you to view all your buckets, create a new bucket, viewcontents of a bucket, add objects to a bucket, and finally the ability to deleteobjects.PREREQUISITES Oracle Application Express 4.0 instance that can make network callouts(note that you cannot use apex.oracle.com which does not supportmaking network callouts) Amazon Web Services account (http://aws.amazon.com) Amazon S3 Account (http://aws.amazon.com/s3) Download and install S3Fox Organizer (http://www.s3fox.net) Grant execute on DBMS CRYTPTO to the schema associated withyour workspaceAMAZON S3 TECHNICAL DETAILSAPI’sAmazon S3 is a web service that provides both a SOAP and a REST API tointeract with the service. This document describes interactions using the RESTAPI.AuthenticationAuthentication is the process of establishing an identity. For the purposes ofAmazon S3, this is done through the use of the poorly named HTTP headercalled Authorization. When you sign up for an AWS account, you are providedwith an AWS Access Key ID and a Secret Access Key. All requests to AmazonS3 need to include the HTTP header Authorization in the following form:AWS AWSAccessKeyId : Signature AWSAccessKeyID should be replaced with your actual AWS Access KeyID and Signature is the HMAC-SHA1 hash of a string composed ofelements of the request using your AWS Secret Key as the key. The hash is thenBase64 encoded. Included in this paper is a function to return this header basedon the string you passed in. This function will be created in the next section.The string that is hashed is a concatenation of the HTTP method, select HTTPheaders sent with the request (such as Date), and the path to the resource.Building an Amazon S3 Client with Application Express 4.0Page 5

Common Request HTTP HeadersThe following table lists the HTTP headers that are usually sent with eachrequest to the Amazon S3 service.Header NameDescriptionRequiredContentLengthLength of the message (without theheaders) according to RFC 2616.ConditionalCondition: Required for PUTs and operationsthat load XML, such as logging and ACLs.Content-TypeThe content type of the resource. Example:text/plainNoDateThe current date and time according to therequester. Example: Wed, 25 Nov 200912:00:00 GMTYesHostNormally, the value of Host iss3.amazonaws.com. A Host header with avalue other than s3.amazonaws.com selectsthe bucket for the request as described inVirtual Hosting of Buckets.ConditionalCondition: Required for HTTP 1.1 (mosttoolkits add this header automatically);optional for HTTP/1.0 requests.AuthorizationThe information required for requestauthentication. For more information, seeThe Authentication Header for details aboutthe format.Yes3CREATE THE APPLICATION AND SUPPORTING OBJECTSCreate Packages and FunctionsFirst you compile a package that contains constants holding your AWS AccessKey ID and your AWS Secret Key. To compile the package, do the following:1. Login to your Oracle Application Express workspace2. Click SQL Workshop3. Click SQL 3/2006-0301/dev/UsingRESTOperations.htmlBuilding an Amazon S3 Client with Application Express 4.0Page 6

4. Paste the code in code listing 1 into the SQL Commands text area5. Replace YourAWSAccessKeyID and YourAWSSecretKey withthe actual values from your account6. Click RunCode Listing 1create or replace package amazon secretsasg aws id constant varchar2(20) : ' YourAWSAccessKeyID ';g aws keyconstant varchar2(40) : ' YourAWSSecretKey ';end amazon secrets;/Next, create a function that will return the Authorization header string with yourAWS Access Key ID and the string from the request hashed with your AWSSecret Key. Use steps 1-6 above and the code from code listing 2. The schemaassociated with your workspace must be granted execute on DBMS CRYPTO.Code Listing 2create or replace function amazon signature sh1(p stringin varchar2) return varchar2asoutput stringVARCHAR2 (32000);encrypted rawRAW (2000);-- storesencrypted binary textdecrypted rawRAW (2000);-- storesdecrypted binary textkey bytes rawRAW (64);-- stores256-bit encryption keybeginkey bytes raw: UTL I18N.STRING TO RAW(amazon secrets.g aws key, 'AL32UTF8');decrypted raw: UTL I18N.STRING TO RAW (p string,'AL32UTF8');encrypted raw : dbms crypto.mac(src decrypted raw, typ DBMS CRYPTO.HMAC SH1, key key bytes raw);output string : UTL I18N.RAW TO CHAR(utl encode.base64 encode(encrypted raw), 'AL32UTF8');return 'AWS' amazon secrets.g aws id ':' output string;end amazon signature sh1;/Building an Amazon S3 Client with Application Express 4.0Page 7

Finally, create functions that will later be used in a query that return just thesignature portion of the Authorization header and another function to return justyour AWS Access Key ID. Use the steps above and the code in code listing 3.Code Listing 3create or replace function amazon sig only(p stringin varchar2) return varchar2asbeginreturn substr(amazon signature sh1(p string),26);end amazon sig only;/create or replace function amazon aws id onlyreturn varchar2asbeginreturn amazon secrets.g aws id;end;/CREATE THE APPLICATIONOnce you have your package and functions compiled in the schema associatedwith your workspace, you create the application that will become the AmazonS3 client. Follow the steps below to create the application.1. Click the Application Builder tab2. Click Create3. Choose Database and click Next 4. Choose From Scratch and click Next 5. Enter Amazon S3 Client in the Name field and click Next 6. In the Add Page section, choose blank page, enter Buckets in the PageName field and Click Add Page7. Click Create8. Click CreateCreate an Application Item for Date Header and ComputationsThe Date HTTP header must be passed with each request to Amazon S3 in theformat “Dy, DD Mon YYYY HH24:MI:SS GMT.” Create an application itemBuilding an Amazon S3 Client with Application Express 4.0Page 8

with a corresponding computation so that the current date and time is computedwhen the page is loaded and when the page is submitted. To create theapplication item and computations:1. Click Shared Components on the Application Builder home page2. Click Application Items under the Logic heading3. Click Create4. Enter S3 DATE TIME in the Name field and click Create5. Click the Shared Components breadcrumb6. Click Application Computations7. Click Create8. Choose S3 DATE TIME from the Computation Item list9. Choose Before Header from the Computation Point list10. Choose PL/SQL Function Body from the Computation Type list11. Enter the following in the Computation field. You may need to adjust thecomputation based on the time zone of your Oracle Application Expressinstance. You can determine the time zone of the instance by running thefollowing query:select dbtimezone from dual;For example, if you are currently 7 hours behind GMT, you would changesysdate 4/24 to sysdate 7/24 in the computation below.return to char(sysdate 4/24,'Dy, DD Mon YYYYHH24:MI:SS') ' GMT';12. Click Create Computation13. Repeat steps 7 – 12 above, choosing After Submit instead of Before Headerin step 9CREATE A PAGE TO VIEW ALL BUCKETSCreate a RESTful Web Reference to View All BucketsTo interact with a web service in Oracle Application Express, you first create aWeb Service Reference to that service. To create a Web Service Reference to listall buckets owned by an AWS account:1. Click Shared Components on the Application Builder home page2. Click Web Service ReferencesBuilding an Amazon S3 Client with Application Express 4.0Page 9

3. Click Create4. Choose REST and click Next5. Enter the following on the REST Details pagea.Enter List All Buckets in the Name fieldb. Enter http://s3.amazonaws.com/ in the URL fieldc.Accept the defaults for HTTP Method and BasicAuthentication and then enter Host in the Name filed underREST HTTP Headers and click Add Headerd. Repeat step c and create Authorization and Date headerse.Click Next6. Click Next on the REST Inputs page since this service has no parameters7. Enter the following on the REST Outputs pagea.Accept the default output format and enter/ListAllMyBucketsResult/Buckets/Bucket in the XPath toOutput Parameters fieldb. Enter http://s3.amazonaws.com/doc/2006-03-01/ in theResponse Namespace fieldc.Enter Name in the Name field and tab to the Path fieldd. Click CreateCreate a Page to View all BucketsNow create the page using the Web Service Reference.1. On the Web Service Reference success page, click Create Form andReport on Web Service2. Choose List All Buckets from the Web Service Reference select list3. Click Next4. Change the page to page 1 to re-use that page5. Change Report Region title to Buckets and click Next6. Choose No to create items for Host, Authorization, and Date. They will bepopulated with values other than items on this page7. Click Next8. Check Name in the parameter list and click Finish9. Click Edit PageBuilding an Amazon S3 Client with Application Express 4.0Page 10

10. Delete the Buckets HTML region (not the report region) which was createdduring the create application wizard. This region is not necessary.11. Edit the doREST region select Never for the Condition Type under theConditions section.12. Edit the page process called Web Service Request and make the followingchangesa.Process Point: On Load - Before Headerb. Input Parametersi. Host: Static Value, s3.amazonaws.comii. Authorization: Function, returnamazon signature sh1('GET' chr(10) chr(10) chr(10) :S3 DATE TIME chr(10) '/');iii. Date: Item, S3 DATE TIMEc.Click Apply Changes13. Run the page and verify that you see a report of bucket names (you shouldcreate a test bucket and add some test objects with another client, likeS3Fox4 prior to running this page)14.Figure 1, List all Buckets PageCREATE A PAGE TO CREATE A NEW BUCKETNow that you can view your buckets, your application should provide the abilityto create a new one.4http://www.s3fox.net/Building an Amazon S3 Client with Application Express 4.0Page 11

Create the RESTful Web Service Reference1. Navigate to Shared Components, Web Service References2. Click Create3. Choose REST from the Web reference type and click Next4. Enter the following on the REST Details pagea.Enter Create Bucket in the Name fieldb. Enter http://&P2 NAME.s3.amazonaws.com/ in the URL fieldc.Choose PUT as the HTTP Method and accept the default forBasic Authenticationd. Enter Host in the Name field under HTTP Headers and clickAdd Headere.Repeat step d and create Authorization and Date headersf.Click Next5. Click Next on the REST Inputs page since this service has no parameters6. Choose Text on the REST Output Format with no other modifications andclick Create. The only response from the service should be an HTTP statuscode if the bucket is successfully created.Create the Page1. On the Web Service Reference success page, click Create Form on WebService2. Choose Create Bucket from the Web Service Reference List and click Next3. On the Page and Region Attributes step, change the following:a.Page Number: 2b. Region Title: Create Bucketc.Breadcrumb: Breadcrumb, Parent Entry – Buckets4. Click Next5. Choose No for Host, Authorization, and Date to not create those items, theywill be populated with function results and an application item.6. Click Next7. Click Finish8. Click Edit Page9. Add text item P2 NAME for the bucket namea.Right-click on the Create Bucket region and choose CreatePage ItemBuilding an Amazon S3 Client with Application Express 4.0Page 12

b. Choose Text Field and click Nextc.Enter P2 NAME in the Item Name field and click Nextd. Accept Item Attribute defaults and click Nexte.Accept Settings defaults and click Nextf.Click Create Item10. Edit the page process called Web Service Request and make the followingchangesa.Input Parametersi. Host: Function, return:P2 NAME '.s3.amazonaws.com';ii. Authorization: Function, returnamazon signature sh1('PUT' chr(10) chr(10) chr(10) :S3 DATE TIME chr(10) '/' :P2 NAME '/');iii. Date: Item, S3 DATE TIMEb. Success Message: Bucket createdc.Click Apply Changes11. Edit the branch to Page 2 and change it to Page 112. Go to the page definition of page 113. Create a button with the following attributes in the region called Buckets:a.Right click on the Buckets region and choose Create RegionButtonb. Button Name: CREATEc.Label: Create Bucketd. Position: Region Template Position #CREATE#e.Action: Redirect to Pagei. Page 2ii. Clear Cache 2f.Click Create Button14. Run page 1, click Create Bucket, enter a name, and then verify you cancreate a bucketBuilding an Amazon S3 Client with Application Express 4.0Page 13

Figure 2, Bucket successfully createdCREATE A PAGE TO LIST BUCKET CONTENTSLogically the next step is to create a page that will list all the objects containedin a bucket.Create the RESTful Web Service Reference1. Navigate to Shared Components, Web Service References2. Click Create3. Choose REST from the Web reference type and click Next4. Enter the following on the REST Details pagea.Enter List Bucket Contents in the Name fieldb. Enter http://s3.amazonaws.com/&P3 NAME. in the URL fieldc.Enter Host in the Name filed under HTTP Headers and clickAdd Headerd. Repeat step c and create Authorization and Date headerse.Click Next5. Since there are no input parameters, click Next6. Enter /ListBucketResult/Contents in the XPath field7. Enter http://s3.amazonaws.com/doc/2006-03-01/ in the ResponseNamespace field8. Enter LastModified in the output parameter Name field, tab to Path fieldBuilding an Amazon S3 Client with Application Express 4.0Page 14

9. Click Add Parameter. Enter Key in the Name field and tab to Path field.10. Click CreateCreate the Page1. On the Web Service Reference success page, click Create Form andReport on Web Service2. Choose List Bucket Contents from the Web Service Reference select listand click Next3. Change the following on the Page and Region Attributes step:a.Page: 3b. Report Region Title: Contentsc.Breadcrumb: Breadcrumb, Entry Name - &P3 NAME.d. Parent Entry: Buckets4. Click Next5. Choose No for Host, Authorization, and Date. They will be populateddifferently, click Next6. On the Report Parameters page:a.Change collection name to P3 BUCKET CONTENTSb. Check all parameters7. Click Finish8. Click Edit Page9. Add a hidden item to the doREST region called P3 NAME10. Edit the doREST region and select Never for the Condition Type underConditions11. Edit the page process called Web Service Request and make the followingchangesa.Process Point: On Load - Before Headerb. Input Parametersi. Host: Function, return:P3 NAME '.s3.amazonaws.com';ii. Authorization: Function, returnamazon signature sh1('GET' chr(10) chr(10) chr(10) :S3 DATE TIME chr(10) '/' :P3 NAME);iii. Date: Item, S3 DATE TIMEBuilding an Amazon S3 Client with Application Express 4.0Page 15

c.Click Apply Changes12. Go to the page definition of page 113. Modify the report attributes of the Buckets region, column Name, supplyingthe following link information:a.Link Text: #Name#b. Page: 3c.Item 1: P3 NAMEd. Value: #Name#14. Run page 1 and then click on the test bucket you created with objects in it (ifyou have not done this yet, now would be a good time). Verify that you canview objects in a bucket.Figure 3, Listing bucket contentsModify Report to Provide Download Link for ObjectsYou construct a link to objects using query string authentication, so you canprovide direct access to the objects through a URL. The signature is added to thequery string of the URL. You provide a URL expiration which is represented asan epoch (number of seconds since January 1, 1970). You create an item on thepage and a computation to calculate the epoch and then modify the query thatdisplays the bucket contents to include the link to download the object.1. Edit page 3 and create a hidden item name P3 EPOCH in the doRESTregionBuilding an Amazon S3 Client with Application Express 4.0Page 16

2. Right-click on P3 EPOCH and choose Create Computation. Create acomputation with the following optionsa.Computation Point: Before Headerb. Computation Type: PL.SQL Function Bodyc.Click Next d. Enter return (trunc(sysdate 2) - (to date('01-01-1970','MMDD-YYYY')))*24*60*60; in the Computation text areae.Click Create3. Modify the query in the Contents region, changing it to the fied','xmlns "http://s3.amazonaws.com/doc/2006-03-01/"') "LastModified", ' ahref "http://' :P3 NAME '.s3.amazonaws.com/' extractValue(value(t),'/*/Key','xmlns "http://s3.amazonaws.com/doc/2006-0301/"') '?AWSAccessKeyId ' amazon aws id only '&Expires ' :P3 EPOCH '&Signature ' wwv flow utilities.url encode2(amazon sig only('GET' chr(10) chr(10) chr(10) :P3 EPOCH chr(10) '/' :P3 NAME '/' extractValue(value(t),'/*/Key','xmlns "http://s3.amazonaws.com/doc/20060301/"'))) '" ' extractValue(value(t),'/*/Key','xmlns "http://s3.amazonaws.com/doc/2006-03-01/"') ' /a ' "Name"from wwv flow collections ketResult/Contents','xmlns "http://s3.amazonaws.com/doc/2006-0301/"'))) twhere c.collection name 'P3 BUCKET CONTENTS'4. Modify the new Name column, changing Display as to Standard ReportColumn5. Run page 3 and verify you can download documentsCREATE A PAGE TO UPLOAD AN OBJECT TO A BUCKETUploading new files for storage on Amazon S3 should be one of the primaryfunctions of any Amazon S3 client. This client is no different and you create apage to upload new files (objects). This page will demonstrate OracleApplication Express’s support for using the PUT method in RESTful requests aswell as support for using a file from a file upload item as the input to a webservice.Building an Amazon S3 Client with Application Express 4.0Page 17

Create the RESTful Web Service Reference1. Navigate to Shared Components, Web Service References2. Click Create3. Choose REST from the Web reference type and click Next4. Enter the following on the REST Details pagea.Enter Create Object in the Name fieldb. Enter http://s3.amazonaws.com/&P3 NAME./&P4 NAME. in theURL fieldc.Choose PUT as the HTTP Methodd. Enter Host in the Name filed under HTTP Headers and click AddHeadere.Repeat step d and create Authorization, Date, and Content-Typeheadersf.Click Next5. Choose File Upload Item on the REST Inputs step and click Next6. Choose Text as the Output Format on the REST Outputs step and clickCreateCreate the Page1. On the Web Service Reference success page, click Create Form on WebService2. Choose Create Object and click Next3. Change the following on the Page and Region Attributes step:a.Page: 4b. Region Title: Create Objectc.Breadcrumb: Breadcrumbd. Parent Entry: &P3 NAME.4. Click Next5. Choose not to create items for Host, Authorization, and Date on the RESTInput Parameters page, change P4 CONTENT-TYPE name toP4 CONTENT TYPE and click Next6. Click Finish7. Click Edit Page8. Edit the P4 CONTENT TYPE item and make it hiddenBuilding an Amazon S3 Client with Application Express 4.0Page 18

9. Create a hidden item P4 NAME10. Right click the P4 CONTENT TYPE item and choose CreateComputation. Create the computation with the following options:a.Computation Point: After Submitb. Computation Type: SQL Query (return single value)c.Click Nextd. Enter the following in the Computation text area:select mime type from apex application files where name :P4 FILEe.Click Create11. Right click the P4 NAME item and choose Create Computation. Create acomputation with the following options:a.Computation Point: After Submitb. Computation Type: SQL Query (return single value)c.Click Nextd. Enter the following in the Computation text area:select filename from apex application files where name :P4 FILEe.Click Create12. Edit the page process called Web Service Request and make the followingchangesa.Input Parametersi. Host: Function, return:P3 NAME '.s3.amazonaws.com';ii. Authorization: Function, returnamazon signature sh1('PUT' chr(10) chr(10) :P4 CONTENT TYPE chr(10) :S3 DATE TIME chr(10) '/' :P3 NAME '/' :P4 NAME);iii. Date: Item, S3 DATE TIMEb. Process Success Message: Object addedc.Click Apply Changes13. Edit the Branch to Page 4, change the branch to page 314. Go to the page definition of page 315. Create a button with the following attributes in the region called Contents:a.Create a button in a region positionBuilding an Amazon S3 Client with Application Express 4.0Page 19

b. Button Name: CREATEc.Label: Create Objectd. Position: Region Template Position #CREATE#e.Action: Redirect to Page in this Applicationf.Page 4g. Clear Cache 4h. Click Create Button16. Run page 3, click Create Object and verify that you can upload a new itemFigure 4, Add object to a bucketADD ABILITY TO DELETE AN OBJECTThe final feature to add to the S3 client is the ability to delete an object. Theability to delete a bucket and its contents is an exercise left to the reader.Create the RESTful Web Service Reference1. Navigate to Shared Components, Web Service References2. Click Create3. Choose REST from the Web reference type and click Next4. Enter the following on the REST Details pagea.Enter Delete Object in the Name fieldb. Enter http://s3.amazonaws.com/&P3 NAME./&P3 DEL NAME.in the URL fieldc.Choose DELETE as the HTTP MethodBuilding an Amazon S3 Client with Application Express 4.0Page 20

d. Enter Host in the Name filed under HTTP Headers and click AddHeadere.Repeat step d and create Authorization and Date headersf.Click Next5. There are no other inputs to the service so on the REST Inputs step simplyclick Next6. Choose Text as the Output Format on the REST Outputs step and clickCreateModify the Report on Page 3 to Include a Delete LinkFirst, create a hidden item on page 3 called P3 DEL NAME. This item willhold the name of the object to be deleted. Then modify the query of the Contentsregion to select a third column, which is simply the object name. Next, modifythe column properties of that new column to link to a URL which callsJavaScript to set the P3 DEL NAME item and submit the page.1. Navigate to the page definition of page 32. Right click on the Contents region and choose Create Page Item3. Complete the wizard to create a hidden item called P3 DEL NAME.Ensure the Value Protected attribute is set to No because you will need toset the value of this item through JavaScript4. Edit the query and replace it with the following new query:Building an Amazon S3 Client with Application Express 4.0Page 21

ns "http://s3.amazonaws.com/doc/2006-03-01/"') "LastModified", ' ahref "http://' :P3 NAME '.s3.amazonaws.com/' extractValue(value(t),'/*/Key','xmlns "http://s3.amazonaws.com/doc/2006-0301/"') '?AWSAccessKeyId ' amazon aws id only '&Expires ' :P3 EPOCH '&Signature ' wwv flow utilities.url encode2(amazon sig only('GET' chr(10) chr(10) chr(10) :P3 EPOCH chr(10) '/' :P3 NAME '/' extractValue(value(t),'/*/Key','xmlns "http://s3.amazonaws.com/doc/20060301/"'))) '" ' extractValue(value(t),'/*/Key','xmlns "http://s3.amazonaws.com/doc/2006-03-01/"') ' /a '"Name",extractValue(value(t),'/*/Key','xmlns "http://s3.amazonaws.com/doc/2006-03-01/"') dfrom wwv flow collections ketResult/Contents','xmlns "http://s3.amazonaws.com/doc/2006-0301/"'))) twhere c.collection name 'P3 BUCKET CONTENTS'5. Edit the D report column and make the following changes:a.Column Heading:  b. Link Text: [ Delete ]c.Target: URLd. URL: javascript: s('P3 DEL NAME','#D#');apex.submit('DELETE');e.Click Apply ChangesCreate Process to Call the Delete Object Web Service ReferenceThe next step is to create a process on the page that uses the Delete Object webservice reference to call the Amazon S3 web service and delete the object. Tocreate the process:1. Navigate to the page definition of pag

Application Express application that is a fully functional Amazon S3 client. The application will allow you to view all your buckets, create a new bucket, view contents of a bucket, add objects to a bucket, and finally the ability to delete objects. PREREQUISITES Oracle Application Express 4.0 instance that can make network callouts