1

I am launching an EC2 instance out of an AMI that i am building using packer . In packer build i specify a provisioning shell script which will mount the drives as well as get some files from S3 bucket into one of this directories which has been mounted.

I can see that build script is working fine without any errors. But when i lauch an EC2 instance from the newly created AMI image, i am not able to see the S3 data that i have extracted and put in directory during provisioning with packer.

  • Is that instance store or ebs ? how are you taking image – Ashish Karpe Mar 06 '17 at 07:42
  • It is instance store. – Krishna Sangeeth Mar 06 '17 at 08:04
  • Your question isn't entirely clear, and I've never heard of Packer. Is the following correct? 1) You have an EC2 instance with an instance store 2) You create an AMI using Packer 3) When you create an EC2 instance based on this AMI it starts but it's not coping files from S3 to the instance store properly? Or are you expecting the instance store you took an image of to be available? What debugging steps have you taken? Are there logs? – Tim Mar 06 '17 at 08:19
  • @Tim yes. I am expecting the new instance i created also to have the S3 data. I can see that when the new AMI is created, the s3 data is correctly pulled in the logs. But when i launch a new instance out of this AMI, i am not able to see the data folder that was created. – Krishna Sangeeth Mar 06 '17 at 08:25
  • Are you pulling the data into a path that is exposed as a volume? Could you maybe provide some info about your Dockerfile (or its contents)? Would trying to pull the data at runtime, rather than build time, be a valid alternative approach? – iwaseatenbyagrue Mar 06 '17 at 08:38
  • What you're trying to achieve still isn't clear, please edit it. Are you trying to include your ephemeral store in your AMI? I don't know if that's possible, I suspect not but I'm not 100% sure. – Tim Mar 06 '17 at 18:32

0 Answers0