Get data out of AWS function in Coffeescript
up vote
0
down vote
favorite
I cannot properly get any data from this AWS function. It seems the data is stuck within the function.
This is one example where I attempted to dump it into a variable, but obviously this is out of scope so data is still just .
data =
asg.describeAutoScalingGroups AutoScalingGroupNames: [ asg_name ] , (err, out) ->
if err? then msg.send "Failed to get ASG details: #err"
else
data.push out.AutoScalingGroups[0].Instances
console.log(data)
I've also tried to simply do:
data = asg.describeAutoScalingGroups AutoScalingGroupNames: [ asg_name ] , (err, out) ->
if err? then msg.send "Failed to get ASG details: #err"
else
out.AutoScalingGroups[0].Instances
console.log(data)
However this just provides request information which does not have any of the detail I'm looking for.
I've looked for ages for examples of people doing this and I just can't find any! Is this possible or is this data stuck only inside that function?
Thank you
coffeescript
New contributor
Dion Jones is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
up vote
0
down vote
favorite
I cannot properly get any data from this AWS function. It seems the data is stuck within the function.
This is one example where I attempted to dump it into a variable, but obviously this is out of scope so data is still just .
data =
asg.describeAutoScalingGroups AutoScalingGroupNames: [ asg_name ] , (err, out) ->
if err? then msg.send "Failed to get ASG details: #err"
else
data.push out.AutoScalingGroups[0].Instances
console.log(data)
I've also tried to simply do:
data = asg.describeAutoScalingGroups AutoScalingGroupNames: [ asg_name ] , (err, out) ->
if err? then msg.send "Failed to get ASG details: #err"
else
out.AutoScalingGroups[0].Instances
console.log(data)
However this just provides request information which does not have any of the detail I'm looking for.
I've looked for ages for examples of people doing this and I just can't find any! Is this possible or is this data stuck only inside that function?
Thank you
coffeescript
New contributor
Dion Jones is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I cannot properly get any data from this AWS function. It seems the data is stuck within the function.
This is one example where I attempted to dump it into a variable, but obviously this is out of scope so data is still just .
data =
asg.describeAutoScalingGroups AutoScalingGroupNames: [ asg_name ] , (err, out) ->
if err? then msg.send "Failed to get ASG details: #err"
else
data.push out.AutoScalingGroups[0].Instances
console.log(data)
I've also tried to simply do:
data = asg.describeAutoScalingGroups AutoScalingGroupNames: [ asg_name ] , (err, out) ->
if err? then msg.send "Failed to get ASG details: #err"
else
out.AutoScalingGroups[0].Instances
console.log(data)
However this just provides request information which does not have any of the detail I'm looking for.
I've looked for ages for examples of people doing this and I just can't find any! Is this possible or is this data stuck only inside that function?
Thank you
coffeescript
New contributor
Dion Jones is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
I cannot properly get any data from this AWS function. It seems the data is stuck within the function.
This is one example where I attempted to dump it into a variable, but obviously this is out of scope so data is still just .
data =
asg.describeAutoScalingGroups AutoScalingGroupNames: [ asg_name ] , (err, out) ->
if err? then msg.send "Failed to get ASG details: #err"
else
data.push out.AutoScalingGroups[0].Instances
console.log(data)
I've also tried to simply do:
data = asg.describeAutoScalingGroups AutoScalingGroupNames: [ asg_name ] , (err, out) ->
if err? then msg.send "Failed to get ASG details: #err"
else
out.AutoScalingGroups[0].Instances
console.log(data)
However this just provides request information which does not have any of the detail I'm looking for.
I've looked for ages for examples of people doing this and I just can't find any! Is this possible or is this data stuck only inside that function?
Thank you
coffeescript
coffeescript
New contributor
Dion Jones is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Dion Jones is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
edited Nov 9 at 14:08
fewlinesofcode
1,482510
1,482510
New contributor
Dion Jones is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked Nov 9 at 13:27
Dion Jones
11
11
New contributor
Dion Jones is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Dion Jones is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Dion Jones is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Dion Jones is a new contributor. Be nice, and check out our Code of Conduct.
Dion Jones is a new contributor. Be nice, and check out our Code of Conduct.
Dion Jones is a new contributor. Be nice, and check out our Code of Conduct.
Dion Jones is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53226610%2fget-data-out-of-aws-function-in-coffeescript%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password