Skip to contentSkip to navigationSkip to topbar
On this page

Credentials AWS Resource


The AWS resource represents Amazon Web Services (AWS) credentials in your Twilio account. Twilio can store video and voice recordings on AWS Simple Storage Service (S3). To access S3, Twilio uses AWS credentials.


AWS Properties

aws-properties page anchor
Property nameTypeRequiredDescriptionChild properties
sidSID<CR>

Optional

Not PII

The unique string that we created to identify the AWS resource.

Pattern: ^CR[0-9a-fA-F]{32}$Min length: 34Max length: 34

account_sidSID<AC>

Optional

The SID of the Account that created the AWS resource.

Pattern: ^AC[0-9a-fA-F]{32}$Min length: 34Max length: 34

friendly_namestring

Optional

PII MTL: 0 days

The string that you assigned to describe the resource.


date_updatedstring<date-time>

Optional

The date and time in GMT when the resource was last updated specified in RFC 2822(link takes you to an external page) format.


urlstring<uri>

Optional

The URI for this resource, relative to https://accounts.twilio.com


Create an AWSCredential resource

create-an-awscredential-resource page anchor

POST https://accounts.twilio.com/v1/Credentials/AWS

Request body parameters

request-body-parameters page anchor
Encoding type:application/x-www-form-urlencoded
SchemaExample
Property nameTypeRequiredDescriptionChild properties
Credentialsstringrequired

A string that contains the AWS access credentials in the format <AWS_ACCESS_KEY_ID>:<AWS_SECRET_ACCESS_KEY>. For example, AKIAIOSFODNN7EXAMPLE:wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY


FriendlyNamestring

Optional

A descriptive string that you create to describe the resource. It can be up to 64 characters long.


AccountSidSID<AC>

Optional

The SID of the Subaccount that this Credential should be associated with. Must be a valid Subaccount of the account issuing the request.

Pattern: ^AC[0-9a-fA-F]{32}$Min length: 34Max length: 34
Add an AWS CredentialLink to code sample: Add an AWS Credential
1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function createCredentialAws() {
11
const aW = await client.accounts.v1.credentials.aws.create({
12
credentials: "Credentials",
13
});
14
15
console.log(aW.sid);
16
}
17
18
createCredentialAws();

Output

1
{
2
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3
"date_created": "2015-07-31T04:00:00Z",
4
"date_updated": "2015-07-31T04:00:00Z",
5
"friendly_name": "friendly_name",
6
"sid": "CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
7
"url": "https://accounts.twilio.com/v1/Credentials/AWS/CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
8
}

Fetch a CredentialAWS resource

fetch-a-credentialaws-resource page anchor

GET https://accounts.twilio.com/v1/Credentials/AWS/{Sid}

Property nameTypeRequiredPIIDescription
SidSID<CR>required

The Twilio-provided string that uniquely identifies the AWS resource to fetch.

Pattern: ^CR[0-9a-fA-F]{32}$Min length: 34Max length: 34
1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function fetchCredentialAws() {
11
const aW = await client.accounts.v1.credentials
12
.aws("CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
13
.fetch();
14
15
console.log(aW.sid);
16
}
17
18
fetchCredentialAws();

Output

1
{
2
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3
"date_created": "2015-07-31T04:00:00Z",
4
"date_updated": "2015-07-31T04:00:00Z",
5
"friendly_name": "friendly_name",
6
"sid": "CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
7
"url": "https://accounts.twilio.com/v1/Credentials/AWS/CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
8
}

Read multiple CredentialAWS resources

read-multiple-credentialaws-resources page anchor

GET https://accounts.twilio.com/v1/Credentials/AWS

Property nameTypeRequiredPIIDescription
PageSizeinteger<int64>

Optional

How many resources to return in each list page. The default is 50, and the maximum is 1000.

Minimum: 1Maximum: 1000

Pageinteger

Optional

The page index. This value is simply for client state.

Minimum: 0

PageTokenstring

Optional

The page token. This is provided by the API.

1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function listCredentialAws() {
11
const aWs = await client.accounts.v1.credentials.aws.list({ limit: 20 });
12
13
aWs.forEach((a) => console.log(a.sid));
14
}
15
16
listCredentialAws();

Output

1
{
2
"credentials": [],
3
"meta": {
4
"first_page_url": "https://accounts.twilio.com/v1/Credentials/AWS?PageSize=50&Page=0",
5
"key": "credentials",
6
"next_page_url": null,
7
"page": 0,
8
"page_size": 50,
9
"previous_page_url": null,
10
"url": "https://accounts.twilio.com/v1/Credentials/AWS?PageSize=50&Page=0"
11
}
12
}

Update a CredentialAWS resource

update-a-credentialaws-resource page anchor

POST https://accounts.twilio.com/v1/Credentials/AWS/{Sid}

Property nameTypeRequiredPIIDescription
SidSID<CR>required

The Twilio-provided string that uniquely identifies the AWS resource to update.

Pattern: ^CR[0-9a-fA-F]{32}$Min length: 34Max length: 34
Encoding type:application/x-www-form-urlencoded
SchemaExample
Property nameTypeRequiredDescriptionChild properties
FriendlyNamestring

Optional

A descriptive string that you create to describe the resource. It can be up to 64 characters long.

1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function updateCredentialAws() {
11
const aW = await client.accounts.v1.credentials
12
.aws("CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
13
.update({ friendlyName: "FriendlyName" });
14
15
console.log(aW.sid);
16
}
17
18
updateCredentialAws();

Output

1
{
2
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3
"date_created": "2015-07-31T04:00:00Z",
4
"date_updated": "2015-07-31T04:00:00Z",
5
"friendly_name": "FriendlyName",
6
"sid": "CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
7
"url": "https://accounts.twilio.com/v1/Credentials/AWS/CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
8
}

Delete a CredentialAWS resource

delete-a-credentialaws-resource page anchor

DELETE https://accounts.twilio.com/v1/Credentials/AWS/{Sid}

Property nameTypeRequiredPIIDescription
SidSID<CR>required

The Twilio-provided string that uniquely identifies the AWS resource to delete.

Pattern: ^CR[0-9a-fA-F]{32}$Min length: 34Max length: 34
1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function deleteCredentialAws() {
11
await client.accounts.v1.credentials
12
.aws("CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
13
.remove();
14
}
15
16
deleteCredentialAws();