s3 addRegion

Complex Case: Replacing a Secure S3 Provider's Configuration

Scénario de test & Cas d'usage

Business Context

A financial services firm is migrating its sensitive data from one secure, S3-compatible cloud provider to another due to new compliance requirements. The test involves adding the new provider's region with mandatory SSL, then correcting a typo in the hostname by replacing the configuration.
About the Set : s3

Reading and writing data on Amazon S3.

Discover all actions of s3
Data Preparation

The s3.addRegion action is a server-side administrative action for configuring S3 connectivity. It does not operate on CAS tables, so no data loading is required.

Copied!
1/* No
2data creation is necessary for this action. */

Étapes de réalisation

1
Add the new secure storage provider region 'secure-archive-eu' with a typo in the host ('s3.newprovidr.com') and a strict SSL requirement on a custom port.
Copied!
1PROC CAS;
2 S3.addRegion /
3 name='secure-archive-eu'
4 host='s3.newprovidr.com'
5 region='eu-west-2'
6 sslrequired=true
7 sslport=9090;
8RUN;
2
The typo is discovered. Replace the existing 'secure-archive-eu' configuration by calling the action again with the same name but the corrected hostname ('s3.newprovider.com').
Copied!
1PROC CAS;
2 S3.addRegion /
3 name='secure-archive-eu'
4 host='s3.newprovider.com'
5 region='eu-west-2'
6 sslrequired=true
7 sslport=9090;
8RUN;
3
List all regions and print the results to confirm that the hostname for 'secure-archive-eu' has been updated correctly.
Copied!
1PROC CAS;
2 S3.listRegions RESULT=r;
3 PRINT r;
4RUN;

Expected Result


Steps 1 and 2 should execute successfully, with the second call overwriting the first. The final result table from step 3 must show only one entry for 'secure-archive-eu' and its host must be the corrected value 's3.newprovider.com', not the initial typo.