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
1,882 views

1 answer to this question.

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 

Hope this helped!

answered Dec 3, 2018 by Archana
• 5,640 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 26, 2018 in AWS by Cloud gunner
• 4,670 points

edited Jun 26, 2018 by Cloud gunner 1,161 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,170 points
3,052 views
0 votes
2 answers

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

If you get lucky (it depends what ...READ MORE

answered Nov 3, 2020 in AWS by anonymous
15,544 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, 2019 in AWS by Archu
3,613 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,041 views
+1 vote
2 answers

AWS CloudWatch Logs in Docker

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

answered Sep 7, 2018 in AWS by bug_seeker
• 15,510 points
2,041 views
0 votes
1 answer

How can I just increase the size of my root disk on AWS EC2 for use with Elastic Beanstalk?

This can be done using the following ...READ MORE

answered Nov 12, 2018 in AWS by Archana
• 5,640 points
3,271 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP