ingenieux / aws-sdk-typescript

Typescript Bindings Generator for the AWS JavaScript SDK
Apache License 2.0
40 stars 40 forks source link

How to set region and lambda apiversion #19

Closed nirmalgoswami closed 8 years ago

nirmalgoswami commented 8 years ago

Hello,

thanks for making this.i am trying to set region and lambda apiversions

so far i tried like this

import AWS = require('aws-sdk');
....
....
AWS.config.region = 'us-west-2';

AWS.config.apiVersions = {
            lambda: '2015-03-31'
        };

but i i got following error Error: Missing region in config(…)

Thank you

CC @aldrinleal

aldrinleal commented 8 years ago

Last time I did:

///<reference path="../typings/tsd.d.ts"/>

import {config as AWSConfig, Credentials, Lambda} from "aws-sdk";

var lambda = new Lambda({
  credentials: new Credentials(accessKeyId || this.accessKeyId, secretAccessKey || this.secretAccessKey),
  region: region || this.region
});

Hope it helps

aldrinleal commented 8 years ago

btw, please refrain from doing CC. As it looked from your public profile, its your behaviour, but remind that just as you've got urgent needs and jobs to do, so do I - and guess what, I'm working as well :)

(tl;dr: not only you didn't need to do a cc, you already made a very bad entrance)

nirmalgoswami commented 8 years ago

@aldrinleal Thanks for answer, sorry if i made mistake in asking question but you are senior and i am always taking word from senior as positive :) i will keep your point in mind thank you

nirmalgoswami commented 8 years ago

It Worked !

Thank you @aldrinleal