How to use AWS session token while creating the S3 credential in Sql Server

Yeturu Jagadeesh Reddy 0 Reputation points
2024-10-29T18:05:30.6133333+00:00

I am using the following code block to create a credential for Sql Server. How can I work with session token if I use the temporary credentials?

CREATE CREDENTIAL [s3://datavirtualizationsample.s3.us-west-2.amazonaws.com/backup]
WITH    
        IDENTITY    = 'S3 Access Key'
,       SECRET      = 'accesskey:secretkey';
GO

SQL Server Other
{count} votes

1 answer

Sort by: Most helpful
  1. LiHongMSFT-4306 31,566 Reputation points
    2024-10-30T02:35:41.6833333+00:00

    Hi @Yeturu Jagadeesh Reddy

    Try this:

    CREATE CREDENTIAL [s3://datavirtualizationsample.s3.us-west-2.amazonaws.com/backup]
    WITH    
            IDENTITY    = '<temporary_access_key_id>'
    ,       SECRET      = '<temporary_secret_access_key:session_token>';
    GO
    

    Best regards,

    Cosmog


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.