I'm not sure that this is a bug.

If you use:
1) Access key id, Secret key, (STS) token
Then these are valid for a maximum of 1h and there is no way of renewing
them with only these. I expect that this is what you are doing.

2) Are using a assume role setup with your ~/.aws/config
Example:
  [profile assumer]
  region = eu-west-1
  # This profile has access key and secret key in ~/.aws/credentials

  [profile packer-assume-role]
  region = eu-west-1
  source_profile = assumer
  role_arn = arn:aws:iam:: 1234567890123:role/PackerRole
  mfa_serial = arn:aws:iam::1234567890123:mfa/assumer

Then everything should work when packer uses "profile":
"packer-assume-role". When the temporary sts credentials expires they will
be automatically be renewed (by the sdk) using the source credentials.

Could you explain how you provide Packer with credentials?

On 31 August 2017 at 05:06, Matthew Hooker <[email protected]> wrote:

> Hi Ashish,
>
> This sounds like it could be a bug. First, make sure you're using the
> latest version of packer, and if you are, will you please create an issue
> at https://github.com/hashicorp/packer/issues with output from the packer
> log with the env var PACKER_LOG=1?
>
>
> Thanks,
> --Matt
>
> On Wed, Aug 30, 2017 at 7:45 PM Ashish Bista <[email protected]> wrote:
>
>> *This is the error what I'm getting:*
>>
>> *23:36:29*     amazon-ebs: passwd: Success*23:37:01*     amazon-ebs: Final 
>> clean up*23:37:01* *==> amazon-ebs: Stopping the source 
>> instance...**23:38:45* *==> amazon-ebs: Error stopping instance: 
>> RequestExpired: Request has expired.
>> 23:38:45 ==> amazon-ebs:     status code: 400, request id: 
>> 37b5a9b7-fa46-4be8-b7e7-ff1d0972dca5**23:38:45* *==> amazon-ebs: Terminating 
>> the source AWS instance...**23:40:15* *==> amazon-ebs: Error terminating 
>> instance, may still be around: RequestExpired: Request has expired.
>> 23:40:15 ==> amazon-ebs:     status code: 400, request id: 
>> b95eaa81-6769-47d3-ae91-45e94d4c1d8e**23:40:15* *==> amazon-ebs: Cleaning up 
>> any extra volumes...**23:41:44* *==> amazon-ebs: Error describing volumes: 
>> RequestExpired: Request has expired.
>> 23:41:44 ==> amazon-ebs:     status code: 400, request id: 
>> 065e2a59-3a39-458d-a3d5-ebef321b3864**23:41:44* *==> amazon-ebs: Deleting 
>> temporary keypair...**23:43:29* *==> amazon-ebs: Error cleaning up keypair. 
>> Please delete the key manually: 
>> packer_59a5e164-638c-fe7d-ec00-88ca39b33fdb**23:43:29* *Build 'amazon-ebs' 
>> errored: Error stopping instance: RequestExpired: Request has expired.
>> 23:43:29     status code: 400, request id: 
>> 37b5a9b7-fa46-4be8-b7e7-ff1d0972dca5**23:43:29* *23:43:29* ==> Some builds 
>> didn't complete successfully and had errors:*23:43:29* --> amazon-ebs: Error 
>> stopping instance: RequestExpired: Request has expired.*23:43:29*         
>> status code: 400, request id: 37b5a9b7-fa46-4be8-b7e7-ff1d0972dca5*23:43:29* 
>> *23:43:29* ==> Builds finished but no artifacts were created.
>>
>> --
>> This mailing list is governed under the HashiCorp Community Guidelines -
>> https://www.hashicorp.com/community-guidelines.html. Behavior in
>> violation of those guidelines may result in your removal from this mailing
>> list.
>>
>> GitHub Issues: https://github.com/mitchellh/packer/issues
>> IRC: #packer-tool on Freenode
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Packer" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To view this discussion on the web visit https://groups.google.com/d/
>> msgid/packer-tool/3b102eb9-b605-4a90-ac79-e3b211230c7f%40googlegroups.com
>> <https://groups.google.com/d/msgid/packer-tool/3b102eb9-b605-4a90-ac79-e3b211230c7f%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> This mailing list is governed under the HashiCorp Community Guidelines -
> https://www.hashicorp.com/community-guidelines.html. Behavior in
> violation of those guidelines may result in your removal from this mailing
> list.
>
> GitHub Issues: https://github.com/mitchellh/packer/issues
> IRC: #packer-tool on Freenode
> ---
> You received this message because you are subscribed to the Google Groups
> "Packer" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/packer-tool/CAEpfdnx12s1x1PndtsutwVQ-jYf8OU%3DNX8YKw_JX%2Bg-
> 1SY0d4g%40mail.gmail.com
> <https://groups.google.com/d/msgid/packer-tool/CAEpfdnx12s1x1PndtsutwVQ-jYf8OU%3DNX8YKw_JX%2Bg-1SY0d4g%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/CALz9Rt-Drz0hR-6eMqYygY1mhdtwFW7_4gn%3DtT1s1spit%2BENbg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to