id stringlengths 14 16 | text stringlengths 1 2.43k | source stringlengths 99 229 |
|---|---|---|
4ac7ec435d1f-0 | You can use `webpack` to generate bundles that run in Node\.js by specifying it as a target in the configuration\.
```
target: "node"
```
This is useful when running a Node\.js application in an environment where disk space is limited\. Here is an example `webpack.config.js` configuration with Node\.js specified as... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/webpack.md |
4ac7ec435d1f-1 | loaders: [
{
test: /\.json$/,
loaders: ['json']
}
]
}
}
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/webpack.md |
cbc29235243d-0 | The SDK automatically detects AWS credentials set as variables in your environment and uses them for SDK requests, eliminating the need to manage credentials in your application\. The environment variables that you set to provide your credentials are:
+ `AWS_ACCESS_KEY_ID`
+ `AWS_SECRET_ACCESS_KEY`
+ `AWS_SESSION_TOKEN... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/loading-node-credentials-environment.md |
832a4be71988-0 | ![\[JavaScript code example that applies to Node.js execution\]](http://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/images/nodeicon.png)
**This Node\.js code example shows:**
+ How to create and manage tables used to store and retrieve data from DynamoDB\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/dynamodb-examples-using-tables.md |
f1863391186a-0 | Similar to other database systems, DynamoDB stores data in tables\. A DynamoDB table is a collection of data that's organized into items that are analogous to rows\. To store or access data in DynamoDB, you create and work with tables\.
In this example, you use a series of Node\.js modules to perform basic operations... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/dynamodb-examples-using-tables.md |
dd9d8708809e-0 | To set up and run this example, first complete these tasks:
+ Install Node\.js\. For more information, see the [Node\.js website](https://nodejs.org)\.
+ Create a shared configurations file with your user credentials\. For more information about providing a shared credentials file, see [Loading Credentials in Node\.js ... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/dynamodb-examples-using-tables.md |
38983269ecc5-0 | Create a Node\.js module with the file name `ddb_createtable.js`\. Be sure to configure the SDK as previously shown\. To access DynamoDB, create an `AWS.DynamoDB` service object\. Create a JSON object containing the parameters needed to create a table, which in this example includes the name and data type for each attr... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/dynamodb-examples-using-tables.md |
38983269ecc5-1 | KeyType: 'HASH'
},
{
AttributeName: 'CUSTOMER_NAME',
KeyType: 'RANGE'
}
],
ProvisionedThroughput: {
ReadCapacityUnits: 1,
WriteCapacityUnits: 1
},
TableName: 'CUSTOMER_LIST',
StreamSpecification: {
StreamEnabled: false
}
};
// Call DynamoDB to create the table
ddb.createTable(params, function(err, data) {
if (err) {
... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/dynamodb-examples-using-tables.md |
a9f94d366762-0 | Create a Node\.js module with the file name `ddb_listtables.js`\. Be sure to configure the SDK as previously shown\. To access DynamoDB, create an `AWS.DynamoDB` service object\. Create a JSON object containing the parameters needed to list your tables, which in this example limits the number of tables listed to 10\. C... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/dynamodb-examples-using-tables.md |
a9f94d366762-1 | ```
node ddb_listtables.js
```
This example code can be found [here on GitHub](https://github.com/awsdocs/aws-doc-sdk-examples/blob/master/javascript/example_code/dynamodb/ddb_listtables.js)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/dynamodb-examples-using-tables.md |
7712368ecf48-0 | Create a Node\.js module with the file name `ddb_describetable.js`\. Be sure to configure the SDK as previously shown\. To access DynamoDB, create an `AWS.DynamoDB` service object\. Create a JSON object containing the parameters needed to describe a table, which in this example includes the name of the table provided a... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/dynamodb-examples-using-tables.md |
7712368ecf48-1 | });
```
To run the example, type the following at the command line\.
```
node ddb_describetable.js TABLE_NAME
```
This example code can be found [here on GitHub](https://github.com/awsdocs/aws-doc-sdk-examples/blob/master/javascript/example_code/dynamodb/ddb_describetable.js)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/dynamodb-examples-using-tables.md |
6bfb916e5522-0 | Create a Node\.js module with the file name `ddb_deletetable.js`\. Be sure to configure the SDK as previously shown\. To access DynamoDB, create an `AWS.DynamoDB` service object\. Create a JSON object containing the parameters needed to delete a table, which in this example includes the name of the table provided as a ... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/dynamodb-examples-using-tables.md |
6bfb916e5522-1 | console.log("Error: Table in use");
} else {
console.log("Success", data);
}
});
```
To run the example, type the following at the command line\.
```
node ddb_deletetable.js TABLE_NAME
```
This example code can be found [here on GitHub](https://github.com/awsdocs/aws-doc-sdk-examples/blob/master/javascript/exampl... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/dynamodb-examples-using-tables.md |
437e930b26f8-0 | ![\[JavaScript code example that applies to Node.js execution\]](http://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/images/nodeicon.png)
**This Node\.js code example shows:**
+ How to specify the time interval during which messages received by a queue are not visible\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/sqs-examples-managing-visibility-timeout.md |
69366b61ca7d-0 | In this example, a Node\.js module is used to manage visibility timeout\. The Node\.js module uses the SDK for JavaScript to manage visibility timeout by using this method of the `AWS.SQS` client class:
+ [https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/SQS.html#changeMessageVisibility-property](https://docs.aw... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/sqs-examples-managing-visibility-timeout.md |
50673e3587ba-0 | To set up and run this example, you must first complete these tasks:
+ Install Node\.js\. For more information about installing Node\.js, see the [Node\.js website](https://nodejs.org)\.
+ Create a shared configurations file with your user credentials\. For more information about providing a shared credentials file, se... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/sqs-examples-managing-visibility-timeout.md |
d2db026a0ac7-0 | Create a Node\.js module with the file name `sqs_changingvisibility.js`\. Be sure to configure the SDK as previously shown\. To access Amazon Simple Queue Service, create an `AWS.SQS` service object\. Receive the message from the queue\.
Upon receipt of the message from the queue, create a JSON object containing the ... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/sqs-examples-managing-visibility-timeout.md |
d2db026a0ac7-1 | QueueUrl: queueURL
}
sqs.receiveMessage(params, function (err, data) {
if (err) {
console.log('Receive Error', err)
} else {
// Make sure we have a message
if (data.Messages != null) {
var visibilityParams = {
QueueUrl: queueURL,
ReceiptHandle: data.Messages[0].ReceiptHandle,
VisibilityTimeout: 20 // 20 second timeou... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/sqs-examples-managing-visibility-timeout.md |
d2db026a0ac7-2 | ```
node sqs_changingvisibility.js
```
This example code can be found [here on GitHub](https://github.com/awsdocs/aws-doc-sdk-examples/blob/master/javascript/example_code/sqs/sqs_changingvisibility.js)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/sqs-examples-managing-visibility-timeout.md |
87e1c97b9034-0 | ![\[JavaScript code example that applies to Node.js execution\]](http://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/images/nodeicon.png)
**This Node\.js code example shows:**
+ Create IP address filters to accept or reject mail that originates from an IP address or range of IP addresses\.
+ List your cu... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/ses-examples-ip-filters.md |
dfb0b3cc6f81-0 | In this example, a series of Node\.js modules are used to send email in a variety of ways\. The Node\.js modules use the SDK for JavaScript to create and use email templates using these methods of the `AWS.SES` client class:
+ [https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/SES.html#createReceiptFilter-propert... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/ses-examples-ip-filters.md |
f0a82312a430-0 | To set up and run this example, you must first complete these tasks:
+ Install Node\.js\. For more information about installing Node\.js, see the [Node\.js website](https://nodejs.org)\.
+ Create a shared configurations file with your user credentials\. For more information about providing a shared credentials file, se... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/ses-examples-ip-filters.md |
e0f8238ce05e-0 | Configure the SDK for JavaScript by creating a global configuration object then setting the Region for your code\. In this example, the Region is set to `us-west-2`\.
```
// Load the SDK for JavaScript
var AWS = require('aws-sdk');
// Set the Region
AWS.config.update({region: 'us-west-2'});
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/ses-examples-ip-filters.md |
3d01aeede404-0 | In this example, use a Node\.js module to send email with Amazon SES\. Create a Node\.js module with the file name `ses_createreceiptfilter.js`\. Configure the SDK as previously shown\.
Create an object to pass the parameter values that define the IP filter, including the filter name, an IP address or range of addres... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/ses-examples-ip-filters.md |
3d01aeede404-1 | // Handle promise's fulfilled/rejected states
sendPromise.then(
function(data) {
console.log(data);
}).catch(
function(err) {
console.error(err, err.stack);
});
```
To run the example, type the following at the command line\. The filter is created in Amazon SES\.
```
node ses_createreceiptfilter.js
```
This examp... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/ses-examples-ip-filters.md |
846827984fcb-0 | In this example, use a Node\.js module to send email with Amazon SES\. Create a Node\.js module with the file name `ses_listreceiptfilters.js`\. Configure the SDK as previously shown\.
Create an empty parameters object\. To call the `listReceiptFilters` method, create a promise for invoking an Amazon SES service obje... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/ses-examples-ip-filters.md |
846827984fcb-1 | ```
To run the example, type the following at the command line\. Amazon SES returns the filter list\.
```
node ses_listreceiptfilters.js
```
This example code can be found [here on GitHub](https://github.com/awsdocs/aws-doc-sdk-examples/blob/master/javascript/example_code/ses/ses_listreceiptfilters.js)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/ses-examples-ip-filters.md |
fe5693956cf3-0 | In this example, use a Node\.js module to send email with Amazon SES\. Create a Node\.js module with the file name `ses_deletereceiptfilter.js`\. Configure the SDK as previously shown\.
Create an object to pass the name of the IP filter to delete\. To call the `deleteReceiptFilter` method, create a promise for invoki... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/ses-examples-ip-filters.md |
fe5693956cf3-1 | });
```
To run the example, type the following at the command line\. The filter is deleted from Amazon SES\.
```
node ses_deletereceiptfilter.js
```
This example code can be found [here on GitHub](https://github.com/awsdocs/aws-doc-sdk-examples/blob/master/javascript/example_code/ses/ses_deletereceiptfilter.js)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/ses-examples-ip-filters.md |
929648de71fe-0 | ![\[JavaScript code example that applies to Node.js execution\]](http://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/images/nodeicon.png)
**This Node\.js code example shows:**
+ How to retrieve information about your key pairs\.
+ How to create a key pair to access an Amazon EC2 instance\.
+ How to delet... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/ec2-example-key-pairs.md |
bea56a05cc5e-0 | Amazon EC2 uses public–key cryptography to encrypt and decrypt login information\. Public–key cryptography uses a public key to encrypt data, then the recipient uses the private key to decrypt the data\. The public and private keys are known as a *key pair*\.
In this example, you use a series of Node\.js modules to p... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/ec2-example-key-pairs.md |
bea56a05cc5e-1 | For more information about the Amazon EC2 key pairs, see [Amazon EC2 Key Pairs](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html) in the *Amazon EC2 User Guide for Linux Instances* or [Amazon EC2 Key Pairs and Windows Instances](https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-key-pairs.... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/ec2-example-key-pairs.md |
a07f588dd6b0-0 | To set up and run this example, first complete these tasks:
+ Install Node\.js\. For more information about installing Node\.js, see the [Node\.js website](https://nodejs.org)\.
+ Create a shared configurations file with your user credentials\. For more information about providing a shared credentials file, see [Loadin... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/ec2-example-key-pairs.md |
10bce15ac408-0 | Create a Node\.js module with the file name `ec2_describekeypairs.js`\. Be sure to configure the SDK as previously shown\. To access Amazon EC2, create an `AWS.EC2` service object\. Create an empty JSON object to hold the parameters needed by the `describeKeyPairs` method to return descriptions for all your key pairs\.... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/ec2-example-key-pairs.md |
10bce15ac408-1 | To run the example, type the following at the command line\.
```
node ec2_describekeypairs.js
```
This example code can be found [here on GitHub](https://github.com/awsdocs/aws-doc-sdk-examples/blob/master/javascript/example_code/ec2/ec2_describekeypairs.js)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/ec2-example-key-pairs.md |
e7cf3ca84570-0 | Each key pair requires a name\. Amazon EC2 associates the public key with the name that you specify as the key name\. Create a Node\.js module with the file name `ec2_createkeypair.js`\. Be sure to configure the SDK as previously shown\. To access Amazon EC2, create an `AWS.EC2` service object\. Create the JSON paramet... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/ec2-example-key-pairs.md |
e7cf3ca84570-1 | });
```
To run the example, type the following at the command line\.
```
node ec2_createkeypair.js
```
This sample code can be found [here on GitHub](https://github.com/awsdocs/aws-doc-sdk-examples/blob/master/javascript/example_code/ec2/ec2_createkeypair.js)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/ec2-example-key-pairs.md |
c5d17ef36d22-0 | Create a Node\.js module with the file name `ec2_deletekeypair.js`\. Be sure to configure the SDK as previously shown\. To access Amazon EC2, create an `AWS.EC2` service object\. Create the JSON parameters to specify the name of the key pair you want to delete\. Then call the `deleteKeyPair` method\.
```
// Load the ... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/ec2-example-key-pairs.md |
c5d17ef36d22-1 | ```
node ec2_deletekeypair.js
```
This example code can be found [here on GitHub](https://github.com/awsdocs/aws-doc-sdk-examples/blob/master/javascript/example_code/ec2/ec2_deletekeypair.js)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/ec2-example-key-pairs.md |
153ab83020f3-0 | ![\[JavaScript code example that applies to Node.js execution\]](http://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/images/nodeicon.png)
**This Node\.js code example shows:**
+ How to send messages in a queue\.
+ How to receive messages in a queue\.
+ How to delete messages in a queue\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/sqs-examples-send-receive-messages.md |
dfd741e11a9c-0 | In this example, a series of Node\.js modules are used to send and receive messages\. The Node\.js modules use the SDK for JavaScript to send and receive messages by using these methods of the `AWS.SQS` client class:
+ [https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/SQS.html#sendMessage-property](https://docs.... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/sqs-examples-send-receive-messages.md |
dfd741e11a9c-1 | For more information about Amazon SQS messages, see [Sending a Message to an Amazon SQS Queue](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-send-message.html) and [Receiving and Deleting a Message from an Amazon SQS Queue](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDev... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/sqs-examples-send-receive-messages.md |
e75e42a3fe2a-0 | To set up and run this example, you must first complete these tasks:
+ Install Node\.js\. For more information about installing Node\.js, see the [Node\.js website](https://nodejs.org)\.
+ Create a shared configurations file with your user credentials\. For more information about providing a shared credentials file, se... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/sqs-examples-send-receive-messages.md |
f9ae01db1acf-0 | Create a Node\.js module with the file name `sqs_sendmessage.js`\. Be sure to configure the SDK as previously shown\. To access Amazon SQS, create an `AWS.SQS` service object\. Create a JSON object containing the parameters needed for your message, including the URL of the queue to which you want to send this message\.... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/sqs-examples-send-receive-messages.md |
f9ae01db1acf-1 | StringValue: "John Grisham"
},
"WeeksOn": {
DataType: "Number",
StringValue: "6"
}
},
MessageBody: "Information about current NY Times fiction bestseller for week of 12/11/2016.",
// MessageDeduplicationId: "TheWhistler", // Required for FIFO queues
// MessageId: "Group1", // Required for FIFO queues
QueueUrl: "SQS_Q... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/sqs-examples-send-receive-messages.md |
34c20e3649a3-0 | Create a Node\.js module with the file name `sqs_receivemessage.js`\. Be sure to configure the SDK as previously shown\. To access Amazon SQS, create an `AWS.SQS` service object\. Create a JSON object containing the parameters needed for your message, including the URL of the queue from which you want to receive messag... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/sqs-examples-send-receive-messages.md |
34c20e3649a3-1 | AttributeNames: [
"SentTimestamp"
],
MaxNumberOfMessages: 10,
MessageAttributeNames: [
"All"
],
QueueUrl: queueURL,
VisibilityTimeout: 20,
WaitTimeSeconds: 0
};
sqs.receiveMessage(params, function(err, data) {
if (err) {
console.log("Receive Error", err);
} else if (data.Messages) {
var deleteParams = {
QueueUrl: que... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/sqs-examples-send-receive-messages.md |
34c20e3649a3-2 | ```
node sqs_receivemessage.js
```
This example code can be found [here on GitHub](https://github.com/awsdocs/aws-doc-sdk-examples/blob/master/javascript/example_code/sqs/sqs_receivemessage.js)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/sqs-examples-send-receive-messages.md |
5deca77d414f-0 | After you install the SDK, you can load a client package in your node application using `require`\. For example, to load the Amazon S3 client, use the following\.
```
const s3 = require('aws-sdk/client-s3');
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/loading-the-jssdk.md |
f1ee2406a038-0 | ![\[JavaScript code example that applies to Node.js execution\]](http://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/images/nodeicon.png)
**This Node\.js code example shows:**
+ How to retrieve your account\-specific endpoint from MediaConvert\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/emc-examples-getendpoint.md |
4c0a78357077-0 | In this example, you use a Node\.js module to call MediaConvert and retrieve your account\-specific endpoint\. You can retrieve your endpoint URL from the service default endpoint and so do not yet need your account\-specific endpoint\. The code uses the SDK for JavaScript to retrieve this endpoint by using this method... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/emc-examples-getendpoint.md |
56d0e7a13521-0 | To set up and run this example, first complete these tasks:
+ Install Node\.js\. For more information, see the [Node\.js website](https://nodejs.org)\.
+ Create a shared configurations file with your user credentials\. For more information about providing a shared credentials file, see [Loading Credentials in Node\.js ... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/emc-examples-getendpoint.md |
e3a688ae9767-0 | Create a Node\.js module with the file name `emc_getendpoint.js`\. Be sure to configure the SDK as previously shown\.
Create an object to pass the empty request parameters for the `describeEndpoints` method of the AWS\.MediaConvert client class\. To call the `describeEndpoints` method, create a promise for invoking a... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/emc-examples-getendpoint.md |
e3a688ae9767-1 | }
);
```
To run the example, type the following at the command line\.
```
node emc_getendpoint.js
```
This example code can be found [here on GitHub](https://github.com/awsdocs/aws-doc-sdk-examples/blob/master/javascript/example_code/mediaconvert/emc_getendpoint.js)\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/emc-examples-getendpoint.md |
177d452f8bfd-0 | The following example creates a multipart upload out of 1 megabyte chunks of a `Buffer` object using the `initiateMultipartUpload` method of the Amazon S3 Glacier service object\.
The example assumes you have already created a vault named `YOUR_VAULT_NAME`\. A complete SHA\-256 tree hash is manually computed using th... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/glacier-example-multipart-upload.md |
177d452f8bfd-1 | // Call Glacier to initiate the upload.
glacier.initiateMultipartUpload(params, function (mpErr, multipart) {
if (mpErr) { console.log('Error!', mpErr.stack); return; }
console.log("Got upload ID", multipart.uploadId);
// Grab each partSize chunk and upload it as a part
for (var i = 0; i < buffer.length; i += partSiz... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/glacier-example-multipart-upload.md |
177d452f8bfd-2 | var doneParams = {
vaultName: vaultName,
uploadId: multipart.uploadId,
archiveSize: buffer.length.toString(),
checksum: treeHash // the computed tree hash
};
console.log("Completing upload...");
glacier.completeMultipartUpload(doneParams, function(err, data) {
if (err) {
console.log("An error occurred while uploading... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/glacier-example-multipart-upload.md |
85b0fa7cc8ec-0 | ![\[JavaScript code example that applies to Node.js execution\]](http://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/images/nodeicon.png)
**This Node\.js code example shows:**
+ Create and delete receipt rules\.
+ Organize receipt rules into receipt rule sets\.
Receipt rules in Amazon SES specify what ... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/ses-examples-receipt-rules.md |
1a032bebece5-0 | In this example, a series of Node\.js modules are used to send email in a variety of ways\. The Node\.js modules use the SDK for JavaScript to create and use email templates using these methods of the `AWS.SES` client class:
+ [https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/SES.html#createReceiptRule-property]... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/ses-examples-receipt-rules.md |
1a032bebece5-1 | + [https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/SES.html#deleteReceiptRuleSet-property](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/SES.html#deleteReceiptRuleSet-property) | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/ses-examples-receipt-rules.md |
6491c85057d5-0 | To set up and run this example, you must first complete these tasks:
+ Install Node\.js\. For more information about installing Node\.js, see the [Node\.js website](https://nodejs.org)\.
+ Create a shared configurations file with your user credentials\. For more information about providing a credentials JSON file, see ... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/ses-examples-receipt-rules.md |
793d246a38a7-0 | Each receipt rule for Amazon SES contains an ordered list of actions\. This example creates a receipt rule with an Amazon S3 action, which delivers the mail message to an Amazon S3 bucket\. For details on receipt rule actions, see [Action Options ](Amazon Simple Email Service Developer Guidereceiving-email-action.html)... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/ses-examples-receipt-rules.md |
793d246a38a7-1 | // Set the region
AWS.config.update({region: 'REGION'});
// Create createReceiptRule params
var params = {
Rule: {
Actions: [
{
S3Action: {
BucketName: "S3_BUCKET_NAME",
ObjectKeyPrefix: "email"
}
}
],
Recipients: [
'DOMAIN | EMAIL_ADDRESS',
/* more items */
],
Enabled: true | false,
Name: "RULE_NAME",
ScanEnabled: t... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/ses-examples-receipt-rules.md |
793d246a38a7-2 | function(err) {
console.error(err, err.stack);
});
```
To run the example, type the following at the command line\. Amazon SES creates the receipt rule\.
```
node ses_createreceiptrule.js
```
This example code can be found [here on GitHub](https://github.com/awsdocs/aws-doc-sdk-examples/blob/master/javascript/exa... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/ses-examples-receipt-rules.md |
7f9d693d17e5-0 | In this example, use a Node\.js module to send email with Amazon SES\. Create a Node\.js module with the file name `ses_deletereceiptrule.js`\. Configure the SDK as previously shown\.
Create a parameters object to pass the name for the receipt rule to delete\. To call the `deleteReceiptRule` method, create a promise ... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/ses-examples-receipt-rules.md |
7f9d693d17e5-1 | console.log("Receipt Rule Deleted");
}).catch(
function(err) {
console.error(err, err.stack);
});
```
To run the example, type the following at the command line\. Amazon SES creates the receipt rule set list\.
```
node ses_deletereceiptrule.js
```
This example code can be found [here on GitHub](https://github.com... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/ses-examples-receipt-rules.md |
4b0711dc738c-0 | In this example, use a Node\.js module to send email with Amazon SES\. Create a Node\.js module with the file name `ses_createreceiptruleset.js`\. Configure the SDK as previously shown\.
Create a parameters object to pass the name for the new receipt rule set\. To call the `createReceiptRuleSet` method, create a prom... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/ses-examples-receipt-rules.md |
4b0711dc738c-1 | ```
To run the example, type the following at the command line\. Amazon SES creates the receipt rule set list\.
```
node ses_createreceiptruleset.js
```
This example code can be found [here on GitHub](https://github.com/awsdocs/aws-doc-sdk-examples/blob/master/javascript/example_code/ses/ses_createreceiptruleset.... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/ses-examples-receipt-rules.md |
1fa40124777b-0 | In this example, use a Node\.js module to send email with Amazon SES\. Create a Node\.js module with the file name `ses_deletereceiptruleset.js`\. Configure the SDK as previously shown\.
Create an object to pass the name for the receipt rule set to delete\. To call the `deleeReceiptRuleSet` method, create a promise f... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/ses-examples-receipt-rules.md |
1fa40124777b-1 | ```
To run the example, type the following at the command line\. Amazon SES creates the receipt rule set list\.
```
node ses_deletereceiptruleset.js
```
This example code can be found [here on GitHub](https://github.com/awsdocs/aws-doc-sdk-examples/blob/master/javascript/example_code/ses/ses_deletereceiptruleset.... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/ses-examples-receipt-rules.md |
4b69ba499adf-0 | The default trust stores for Node\.js include the certificates needed to access AWS services\. In some cases, it might be preferable to include only a specific set of certificates\.
In this example, a specific certificate on disk is used to create an `https.Agent` that rejects connections unless the designated certif... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/node-registering-certs.md |
e237796428b5-0 | ![\[JavaScript code example that applies to browser execution\]](http://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/images/browsericon.png)
**This browser script example shows you:**
+ How to access AWS services from a browser script using Amazon Cognito Identity\.
+ How to turn text into synthesized sp... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/getting-started-browser.md |
0bdd656d08ab-0 | Amazon Polly is a cloud service that converts text into lifelike speech\. You can use Amazon Polly to develop applications that increase engagement and accessibility\. Amazon Polly supports multiple languages and includes a variety of lifelike voices\. For more information about Amazon Polly, see the [Amazon Polly Deve... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/getting-started-browser.md |
0bdd656d08ab-1 | + [https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Polly/Presigner.html](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Polly/Presigner.html) constructor
+ [https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Polly/Presigner.html#getSynthesizeSpeechUrl-property](https://docs.aws.amazon.com/AWSJavaS... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/getting-started-browser.md |
fb2ff85739d5-0 | In this exercise, you create and use an Amazon Cognito Identity pool to provide unauthenticated access to your browser script for the Amazon Polly service\. Creating an identity pool also creates two AWS Identity and Access Management \(IAM\) roles, one to support users authenticated by an identity provider and the oth... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/getting-started-browser.md |
fb2ff85739d5-1 | 1. Choose **Enable access to unauthenticated identities**\.
1. Choose **Create Pool**\.
1. On the next page, choose **View Details** to see the names of the two IAM roles created for your identity pool\. Make a note of the name of the role for unauthenticated identities\. You need this name to add the required poli... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/getting-started-browser.md |
dcb678ab3139-0 | To enable browser script access to Amazon Polly for speech synthesis, use the unauthenticated IAM role created for your Amazon Cognito identity pool\. This requires you to add an IAM policy to the role\. For more information about IAM roles, see [Creating a Role to Delegate Permissions to an AWS Service](https://docs.a... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/getting-started-browser.md |
dcb678ab3139-1 | You can use this process to enable access to any Amazon or AWS service\.
1. Choose **Attach policy**\.
After you create your Amazon Cognito identity pool and add permissions for Amazon Polly to your IAM role for unauthenticated users, you are ready to build the webpage and browser script\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/getting-started-browser.md |
0ee29fc0ff2a-0 | The sample app consists of a single HTML page that contains the user interface and browser script\. To begin, create an HTML document and copy the following contents into it\. The page includes an input field and button, an `<audio>` element to play the synthesized speech, and a `<p>` element to display messages\. \(No... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/getting-started-browser.md |
0ee29fc0ff2a-1 | <source id="audioSource" type="audio/mp3" src="">
</audio>
<!-- (script elements go here) -->
</body>
</html>
```
Save the HTML file, naming it `polly.html`\. After you have created the user interface for the application, you're ready to add the browser script code that runs the application\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/getting-started-browser.md |
1069d8bc5595-0 | The first thing to do when creating the browser script is to include the SDK for JavaScript by adding a `<script>` element after the `<audio>` element in the page\.
```
<script src="https://sdk.amazonaws.com/js/aws-sdk-SDK_VERSION_NUMBER.min.js"></script>
```
\(To find the current SDK\_VERSION\_NUMBER, see the API ... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/getting-started-browser.md |
1069d8bc5595-1 | ```
<script type="text/javascript">
// Initialize the Amazon Cognito credentials provider
AWS.config.region = 'REGION';
AWS.config.credentials = new AWS.CognitoIdentityCredentials({IdentityPoolId: 'IDENTITY_POOL_ID'});
// Function invoked by button click
function speakText() {
// Create the JSON parameters for getS... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/getting-started-browser.md |
1069d8bc5595-2 | After you create the presigner object, call the `getSynthesizeSpeechUrl` method of that object, passing the speech parameters\. If successful, this method returns the URL of the synthesized speech, which you then assign to the `<audio>` element for playback\.
```
// Create the Polly service object and presigner objec... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/getting-started-browser.md |
2b1c0b5ae8c4-0 | To run the example app, load `polly.html` into a web browser\. The app should look similar to the following\.
![\[Web application browser interface\]](http://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/images/browsergetstarted.png)
Enter a phrase you want turned to speech in the input box, then choose... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/getting-started-browser.md |
483af3f3d763-0 | Here is the full HTML page with the browser script\. It's also available [here on GitHub](https://github.com/awsdocs/aws-doc-sdk-examples/blob/master/javascript/example_code/browserstart/polly.html)\.
```
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>AWS SDK for JavaScript - Browser Getting Started Appl... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/getting-started-browser.md |
483af3f3d763-1 | <script type="text/javascript">
// Initialize the Amazon Cognito credentials provider
AWS.config.region = 'REGION';
AWS.config.credentials = new AWS.CognitoIdentityCredentials({IdentityPoolId: 'IDENTITY_POOL_ID'});
// Function invoked by button click
function speakText() {
// Create the JSON parameters for getSynth... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/getting-started-browser.md |
483af3f3d763-2 | if (error) {
document.getElementById('result').innerHTML = error;
} else {
document.getElementById('audioSource').src = url;
document.getElementById('audioPlayback').load();
document.getElementById('result').innerHTML = "Speech ready to play.";
}
});
}
</script>
</body>
</html>
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/getting-started-browser.md |
ebc98b163481-0 | Here are variations on this application you can use to further explore using the SDK for JavaScript in a browser script\.
+ Experiment with other sound output formats\.
+ Add the option to select any of the various voices provided by Amazon Polly\.
+ Integrate an identity provider like Facebook or Amazon to use with th... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/getting-started-browser.md |
b060c88982ee-0 | AWS Identity and Access Management \(IAM\) is an Amazon Web Services \(AWS\) service that helps an administrator securely control access to AWS resources\. IAM administrators control who can be *authenticated* \(signed in\) and *authorized* \(have permissions\) to use resources in AWS services\. IAM is an AWS service t... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/security-iam.md |
b060c88982ee-1 | This AWS product or service follows the [shared responsibility model](https://aws.amazon.com/compliance/shared-responsibility-model/) through the specific Amazon Web Services \(AWS\) services it supports\. For AWS service security information, see the [AWS service security documentation page](https://docs.aws.amazon.co... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/security-iam.md |
58e8218cf924-0 | Amazon Simple Queue Service \(SQS\) is a fast, reliable, scalable, fully managed message queuing service\. Amazon SQS lets you decouple the components of a cloud application\. Amazon SQS includes standard queues with high throughput and at\-least\-once processing, and FIFO queues that provide FIFO \(first\-in, first\-o... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/sqs-examples.md |
58e8218cf924-1 | + [Enabling Long Polling in Amazon SQS](sqs-examples-enable-long-polling.md)
+ [Using Dead Letter Queues in Amazon SQS](sqs-examples-dead-letter-queues.md) | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/sqs-examples.md |
8073917898c9-0 | Here is the browser script code for the Kinesis capturing webpage scroll progress example\.
```
// Configure Credentials to use Cognito
AWS.config.credentials = new AWS.CognitoIdentityCredentials({
IdentityPoolId: 'IDENTITY_POOL_ID'
});
AWS.config.region = 'REGION';
// We're going to partition Amazon Kinesis record... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/kinesis-examples-capturing-page-scrolling-full.md |
8073917898c9-1 | var TID = null;
blogContent.addEventListener('scroll', function(event) {
clearTimeout(TID);
// Prevent creating a record while a user is actively scrolling
TID = setTimeout(function() {
// calculate percentage
var scrollableElement = event.target;
var scrollHeight = scrollableElement.scrollHeight;
var scrollTop = scrol... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/kinesis-examples-capturing-page-scrolling-full.md |
8073917898c9-2 | setInterval(function() {
if (!recordData.length) {
return;
}
// upload data to Amazon Kinesis
kinesis.putRecords({
Records: recordData,
StreamName: 'NAME_OF_STREAM'
}, function(err, data) {
if (err) {
console.error(err);
}
});
// clear record data
recordData = [];
}, 1000);
});
``` | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/kinesis-examples-capturing-page-scrolling-full.md |
1732fc4893fd-0 | A common scenario for using Node\.js with the SDK for JavaScript is to set up and run a Node\.js web application on an Amazon Elastic Compute Cloud \(Amazon EC2\) instance\. In this tutorial, you will create a Linux instance, connect to it using SSH, and then install Node\.js to run on that instance\. | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/setting-up-node-on-ec2-instance.md |
d3a56d708f39-0 | This tutorial assumes that you have already launched a Linux instance with a public DNS name that is reachable from the Internet and to which you are able to connect using SSH\. For more information, see [Step 1: Launch an Instance](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EC2_GetStarted.html#ec2-launch-inst... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/setting-up-node-on-ec2-instance.md |
fb7e81670422-0 | The following procedure helps you install Node\.js on an Amazon Linux instance\. You can use this server to host a Node\.js web application\.
**To set up Node\.js on your Linux instance**
1. Connect to your Linux instance as `ec2-user` using SSH\.
1. Install node version manager \(nvm\) by typing the following at... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/setting-up-node-on-ec2-instance.md |
fb7e81670422-1 | ```
nvm install node
```
Installing Node\.js also installs the Node Package Manager \(`npm`\) so you can install additional modules as needed\.
1. Test that Node\.js is installed and running correctly by typing the following at the command line\.
```
node -e "console.log('Running Node.js ' + process.version)"
```... | https://github.com/siagholami/aws-documentation/tree/main/documents/aws-sdk-for-javascript-v3/doc_source/setting-up-node-on-ec2-instance.md |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.