AWS S3 spoke for multi AWS accounts

NozomiT
Tera Contributor

Could you please help us with the details for AWS S3 bucket creation with ServiceNow Spoke?
We have many AWS accounts.
We need to select any target AWS account on Flow designer, but I can't find how to select it.


snow.png

 

5 REPLIES 5

Shreya Shah
ServiceNow Employee
ServiceNow Employee

The AWS S3 Spoke uses credential alias for connection to AWS. Since you have many AWS accounts

1. Please create multiple aliases, one for each account.

2. Copy the existing create bucket action and customise it to add a new input for credential alias, and use that input in the rest step instead of the spoke default alias.

Thank you for your reply.
I'd like to know details about step 1.

We have set up some credentials for each account.
If you have any more suggestion about step 1 activity, could you please let me know.

snow1.png

Shreya Shah
ServiceNow Employee
ServiceNow Employee

In the screenshot you have shared you seem to have created multiple credentials for the Amazon_S3 Credential Alias, instead create multiple credential aliases, one for each region.

 

You can then make use of decision table or your custom mapping table to give answer which credential alias to use as input in the custom action in your flow to create bucket.

Thank you for the reply.

 

We faced a similar issue on uploading files to new S3 buckets with different credentials.

In addition to clonning the action and changing the connection alias,

had to bypass below validation on the pre-processing step.

outputs.bucket_name = new AmazonS3Utils().ValidateBucketName(inputs.bucket_name);
outputs.bucket_region = new AmazonS3Utils().getBucketRegion(outputs.bucket_name);


I think internally AmazonS3Utils using the default S3 credentials, which doesn't have access to the new S3 buckets.