Call the aws ec2 REST API to create the security group or create the instance


#1

hi,

https://ec2.amazonaws.com/?Action=CreateSecurityGroup
&GroupName=websrv
&GroupDescription=Web Servers
&AUTHPARAMS…

i have access key id and secret access key and this API, what are the
parameters are need for this process we should need signature, token, time
stamp or not …it is must means and how to get this with my params…what
is authparams…

thanks and regards,
Ganesan.A


#2

facepalm

On 21 December 2012 23:52, ganesan15785@gmail.com wrote:

hi,

https://ec2.amazonaws.com/?Action=CreateSecurityGroup
&GroupName=websrv
&GroupDescription=Web Servers
&AUTHPARAMS…

i have access key id and secret access key and this API, what are the
parameters are need for this process we should need signature, token, time
stamp or not …it is must means and how to get this with my
params…what
is authparams…

thanks and regards,
Ganesan.A


#3

Ganesan,

You are expected to typically leverage the AWS EC2 API via tools in some way.

There are very specific, widely used tools here:

There’s also abstraction libraries like fog - http://fog.io/ - that
can do a lot of these actions.

If you want to write your own, then by all means, but I definitely
think that is beyond the scope of the Chef lists.

Best,
-M

On Fri, Dec 21, 2012 at 5:52 AM, ganesan15785@gmail.com wrote:

hi,

https://ec2.amazonaws.com/?Action=CreateSecurityGroup
&GroupName=websrv
&GroupDescription=Web Servers
&AUTHPARAMS…

i have access key id and secret access key and this API, what are the
parameters are need for this process we should need signature, token, time
stamp or not …it is must means and how to get this with my params…what
is authparams…

thanks and regards,
Ganesan.A


#4

Yeah, if you’re not going to use the gems you’ll need to structure the request correctly, generate the HMAC signature (of the payload and HTTP headers along with a timestamp) and sign the requests. This is done by including an authorization header or signature query string param of the previously computed signature.

It’s not difficult but definitely not worth dealing with the APIs directly over using the available gems. Read this to learn how to sign the requests: http://s3.amazonaws.com/doc/s3-developer-guide/RESTAuthentication.html

On Friday, December 21, 2012 at 4:56 PM, Mike wrote:

Ganesan,

You are expected to typically leverage the AWS EC2 API via tools in some way.

There are very specific, widely used tools here:
http://aws.amazon.com/developertools/351

There’s also abstraction libraries like fog - http://fog.io/ - that
can do a lot of these actions.

If you want to write your own, then by all means, but I definitely
think that is beyond the scope of the Chef lists.

Best,
-M

On Fri, Dec 21, 2012 at 5:52 AM, <ganesan15785@gmail.com (mailto:ganesan15785@gmail.com)> wrote:

hi,

https://ec2.amazonaws.com/?Action=CreateSecurityGroup
&GroupName=websrv
&GroupDescription=Web Servers
&AUTHPARAMS…

i have access key id and secret access key and this API, what are the
parameters are need for this process we should need signature, token, time
stamp or not …it is must means and how to get this with my params…what
is authparams…

thanks and regards,
Ganesan.A


#5

If you do end up rolling your own, ruby’s URI escaping mechanisms don’t match what amazon wants (amazon wants one RFC, ruby provides another).

This took a while to sort out when I needed to hand roll some stuff in the past. :slight_smile: Luckily aws-sdk does damn near everything you need to do with AWS and ruby these days.


Erik Hollensbe
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)

On Friday, December 21, 2012 at 2:04 PM, Daniel Condomitti wrote:

Yeah, if you’re not going to use the gems you’ll need to structure the request correctly, generate the HMAC signature (of the payload and HTTP headers along with a timestamp) and sign the requests. This is done by including an authorization header or signature query string param of the previously computed signature.

It’s not difficult but definitely not worth dealing with the APIs directly over using the available gems. Read this to learn how to sign the requests: http://s3.amazonaws.com/doc/s3-developer-guide/RESTAuthentication.html

On Friday, December 21, 2012 at 4:56 PM, Mike wrote:

Ganesan,

You are expected to typically leverage the AWS EC2 API via tools in some way.

There are very specific, widely used tools here:
http://aws.amazon.com/developertools/351

There’s also abstraction libraries like fog - http://fog.io/ - that
can do a lot of these actions.

If you want to write your own, then by all means, but I definitely
think that is beyond the scope of the Chef lists.

Best,
-M

On Fri, Dec 21, 2012 at 5:52 AM, <ganesan15785@gmail.com (mailto:ganesan15785@gmail.com)> wrote:

hi,

https://ec2.amazonaws.com/?Action=CreateSecurityGroup
&GroupName=websrv
&GroupDescription=Web Servers
&AUTHPARAMS…

i have access key id and secret access key and this API, what are the
parameters are need for this process we should need signature, token, time
stamp or not …it is must means and how to get this with my params…what
is authparams…

thanks and regards,
Ganesan.A