I am encountering an issue when using Packer to create an AMI from a source AMI in the AWS Marketplace. Here are the details:
Problem
Packer is configured with a set of AWS credentials, and the source AMI in the AWS Marketplace requires a subscription. I can launch an instance from the source AMI. However, when attempting to use Packer with the exact same credentials, I encounter the following error:
==> amazon-ebs.aws: Error launching source instance: OptInRequired: In order to use this AWS Marketplace product you need to accept terms and subscribe. To do so please visit https://aws.amazon.com/marketplace/pp?sku=cotnnspjrsi38lfn8qo4ibnnm
Steps to Reproduce
Subscribe to the source AMI in the AWS Marketplace.
Use the same AWS credentials on the command line to launch an instance from the source AMI (successfully).
Configure Packer with the same AWS credentials and attempt to create an AMI.
Encounter the "OptInRequired" error mentioned above.
Expected Behavior
Packer should be able to use the subscribed credentials to create an AMI from the source AMI in the AWS Marketplace without encountering the "OptInRequired" error.
Environment
Packer Version: 1.9.4
Operating System: Ubuntu
Community Note
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment
When filing a bug, please include the following headings if possible. Any
example text in this template can be deleted.
Overview of the Issue
A paragraph or two about the issue you're experiencing.
Reproduction Steps
Steps to reproduce this issue
Packer version
From packer version
Simplified Packer Template
If the file is longer than a few dozen lines, please include the URL to the
gist of the log or use the Github detailed
format
instead of posting it directly in the issue.
Operating system and Environment details
OS, Architecture, and any other information you can provide about the
environment.
Log Fragments and crash.log files
Include appropriate log fragments. If the log is longer than a few dozen lines,
please include the URL to the gist of the log or
use the Github detailed format instead of posting it directly in the issue.
Set the env var PACKER_LOG=1 for maximum log detail.
Description
I am encountering an issue when using Packer to create an AMI from a source AMI in the AWS Marketplace. Here are the details:
Problem
Packer is configured with a set of AWS credentials, and the source AMI in the AWS Marketplace requires a subscription. I can launch an instance from the source AMI. However, when attempting to use Packer with the exact same credentials, I encounter the following error:
Steps to Reproduce
Expected Behavior
Packer should be able to use the subscribed credentials to create an AMI from the source AMI in the AWS Marketplace without encountering the "OptInRequired" error.
Environment
Packer Version: 1.9.4 Operating System: Ubuntu
Community Note
When filing a bug, please include the following headings if possible. Any example text in this template can be deleted.
Overview of the Issue
A paragraph or two about the issue you're experiencing.
Reproduction Steps
Steps to reproduce this issue
Packer version
From
packer version
Simplified Packer Template
If the file is longer than a few dozen lines, please include the URL to the gist of the log or use the Github detailed format instead of posting it directly in the issue.
Operating system and Environment details
OS, Architecture, and any other information you can provide about the environment.
Log Fragments and crash.log files
Include appropriate log fragments. If the log is longer than a few dozen lines, please include the URL to the gist of the log or use the Github detailed format instead of posting it directly in the issue.
Set the env var
PACKER_LOG=1
for maximum log detail.