document why we retry in lambda source mapping
This commit is contained in:
parent
6b733a09eb
commit
312f2dd6e3
|
@ -91,6 +91,13 @@ func resourceAwsLambdaEventSourceMappingCreate(d *schema.ResourceData, meta inte
|
|||
Enabled: aws.Bool(d.Get("enabled").(bool)),
|
||||
}
|
||||
|
||||
// IAM profiles and roles can take some time to propagate in AWS:
|
||||
// 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
|
||||
// function defined for the task cannot be assumed by Lambda.
|
||||
//
|
||||
// The role may exist, but the permissions may not have propagated, so we
|
||||
// retry
|
||||
err := resource.Retry(1*time.Minute, func() error {
|
||||
eventSourceMappingConfiguration, err := conn.CreateEventSourceMapping(params)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue