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
362 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 https://basarat.gitbooks.io/typescript/content/docs/project/modules.html

Hope this helped!

answered Dec 3, 2018 by Archana
• 5,560 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,280 points

edited Jun 26, 2018 by Cloud gunner 95 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
50 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
456 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
59 views
+13 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 26, 2018 in DevOps & Agile by DragonLord999
• 8,380 points
174 views
+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
• 15,350 points
357 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,560 points
184 views