fix error with undefined err

This commit is contained in:
clint shryock 2016-01-05 11:35:21 -06:00
parent 312f2dd6e3
commit 449ffe027f
1 changed files with 1 additions and 1 deletions

View File

@ -153,7 +153,7 @@ func resourceAwsLambdaFunctionCreate(d *schema.ResourceData, meta interface{}) e
// http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html#launch-instance-with-role-console // http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html#launch-instance-with-role-console
// Error creating Lambda function: InvalidParameterValueException: The role defined for the task cannot be assumed by Lambda. // Error creating Lambda function: InvalidParameterValueException: The role defined for the task cannot be assumed by Lambda.
err := resource.Retry(1*time.Minute, func() error { err := resource.Retry(1*time.Minute, func() error {
_, err = conn.CreateFunction(params) _, err := conn.CreateFunction(params)
if err != nil { if err != nil {
if awserr, ok := err.(awserr.Error); ok { if awserr, ok := err.(awserr.Error); ok {
if awserr.Code() == "InvalidParameterValueException" { if awserr.Code() == "InvalidParameterValueException" {