title: Elastic Beanstalk manual deploy application version S3 error
body: <p>When I try to deploy another application version:</p>
  <p><a href="https://i.stack.imgur.com/Q1AZA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Q1AZA.png" alt="enter image description here" /></a></p>
  <p>I get the following S3 error message:</p>
  <p><a href="https://i.stack.imgur.com/hMJVR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hMJVR.png" alt="enter image description here" /></a></p>
  <p>For test purposes, the attached aws-service-role, instance profile and the user doing the manual deploy have full S3 access.</p>
  <p>The service and instance roles look like the following:</p>
  <pre><code>createServiceRole(): Role {
      const assumedBy = new ServicePrincipal(&quot;elasticbeanstalk.amazonaws.com&quot;)
      return new Role(this, `${this.settings.prefix}-service-role-${this.env}-id`, {
          roleName: `${this.settings.serviceName}-service-role-${this.env}`,
          assumedBy: assumedBy,
          managedPolicies: [
              {managedPolicyArn: &quot;arn:aws:iam::aws:policy/AdministratorAccess-AWSElasticBeanstalk&quot;},
              {managedPolicyArn: &quot;arn:aws:iam::aws:policy/AmazonS3FullAccess&quot;}
          ]
      })
  }
  
  createInstanceProfile(): CfnInstanceProfile {
      const assumedBy = new ServicePrincipal(&quot;ec2.amazonaws.com&quot;)
      const role = new Role(this, `${this.settings.serviceName}-access-role-${this.env}-id`, {
          roleName: `${this.settings.serviceName}-instance-profile-role-${this.env}`,
          assumedBy: assumedBy,
          managedPolicies: [
              {managedPolicyArn: &quot;arn:aws:iam::aws:policy/AWSElasticBeanstalkWebTier&quot;},
              {managedPolicyArn: &quot;arn:aws:iam::aws:policy/AWSElasticBeanstalkWorkerTier&quot;},
              {managedPolicyArn: &quot;arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly&quot;},
              {managedPolicyArn: &quot;arn:aws:iam::aws:policy/AWSElasticBeanstalkMulticontainerDocker&quot;},
              {managedPolicyArn: &quot;arn:aws:iam::aws:policy/AmazonS3FullAccess&quot;}
          ]
      })
  
      return new CfnInstanceProfile(this, `${this.settings.serviceName}-instance-profile-${this.env}-id`, {
          instanceProfileName: `${this.settings.serviceName}-instance-profile-${this.env}`,
          roles: [role.roleName]
      })
  }
  </code></pre>
  <p>Any idea?</p>