How do I use AWS sdk definitions for TypeScript?

0 votes

I am trying to write an SES TypeScript client

Here is what I've tried:

/// <reference path="../typings/aws-sdk.d.ts" />
var AWS = require('aws-sdk'); 
var ses:SES = new AWS.SES();

Here is the error that I get:

/usr/local/bin/tsc --sourcemap SesTest.ts
SesTest.ts(3,9): error TS2304: Cannot find name 'SES'.

Process finished with exit code 2

I cannot find any documentation on how to make this work. Please help!

Dec 3, 2018 in AWS by Datageek
• 140 points
222 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

Hey, slight modification with what you have done. 

Change to :

import AWS = require('aws-sdk'); 
var ses:AWS.SES = new AWS.SES();

Note: if import is unclear you probably want to read up on modules https://basarat.gitbooks.io/typescript/content/docs/project/modules.html

Hope this helped!

answered Dec 3, 2018 by Archana
• 5,360 points

Related Questions In AWS

0 votes
2 answers

How do I define the principal for an AWS policy statement?

Check with AWS Policy Documentations once, rest ...READ MORE

answered Jun 25, 2018 in AWS by Cloud gunner
• 4,240 points

edited Jun 26, 2018 by Cloud gunner 60 views
0 votes
1 answer

How do I enable SSH for my AWS-EB instance?

Using the EB CLI to do eb ...READ MORE

answered Oct 9, 2018 in AWS by Archana
• 4,090 points
28 views
0 votes
1 answer

How do I add python libraries to an AWS lambda function for Alexa?

As it is described in the Amazon ...READ MORE

answered Oct 23, 2018 in AWS by Archana
• 4,090 points
118 views
0 votes
1 answer

How do I configure and attach an internet gateway for use with Elastic Load Balancing?

Follow these steps: First, create an internet gateway and ...READ MORE

answered May 16 in AWS by Archu
20 views
+13 votes
2 answers
+1 vote
2 answers

AWS CloudWatch Logs in Docker

The awslogs works without using ECS. you need to configure ...READ MORE

answered Sep 6, 2018 in AWS by bug_seeker
• 14,980 points
243 views
0 votes
1 answer

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.