# AWS Batch cannot determine region of bucket

**URL:** <https://community.seqera.io/t/aws-batch-cannot-determine-region-of-bucket/431>\
**Category:** Ask for help\
**Tags:** aws, platform\
**Created:** [January 25, 2024, 8:08pm UTC](https://community.seqera.io/t/aws-batch-cannot-determine-region-of-bucket/431 "2024-01-25T20:08:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![shasha](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/shasha/32/446_2.png) [@shasha](https://community.seqera.io/u/shasha)\
**Post date:** [January 25, 2024, 8:08pm UTC](https://community.seqera.io/t/aws-batch-cannot-determine-region-of-bucket/431/1 "2024-01-25T20:08:59Z")

</div>

I need to create a new Compute Environment in AWS Batch but it says that it cannot determine region of bucket. Can you help please?

 ![Screenshot 2024-01-26 at 4.50.20 AM](https://europe1.discourse-cdn.com/flex013/uploads/seqera/original/1X/230ce1ed0802cb177c8cf43fec3501108974c8d1.png)  
 ![Screenshot 2024-01-26 at 4.50.14 AM](https://europe1.discourse-cdn.com/flex013/uploads/seqera/original/1X/c6c6ece8a5f3ebee5d60c5122e7291d826969e9c.png)

---

<div class="post-metadata">

**Author:** ![mribeirodantas](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/mribeirodantas/32/235_2.png) [@mribeirodantas](https://community.seqera.io/u/mribeirodantas)\
**Post date:** [January 25, 2024, 8:59pm UTC](https://community.seqera.io/t/aws-batch-cannot-determine-region-of-bucket/431/2 "2024-01-25T20:59:21Z")

</div>

Does the “sequera-virginia-e1” bucket really exist? Seqera has no **u** , so maybe it’s a typo?

---

<div class="post-metadata">

**Author:** ![shasha](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/shasha/32/446_2.png) [@shasha](https://community.seqera.io/u/shasha)\
**Post date:** [January 25, 2024, 9:15pm UTC](https://community.seqera.io/t/aws-batch-cannot-determine-region-of-bucket/431/3 "2024-01-25T21:15:43Z")

</div>

@mribeirodantas, yes I created this bucket in aws.

 ![Screenshot 2024-01-26 at 6.14.55 AM](https://europe1.discourse-cdn.com/flex013/uploads/seqera/original/1X/e73337c48fe1cd0cd9b395b2be41f72c2a099410.png)

---

<div class="post-metadata">

**Author:** ![matteofiandesio](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/matteofiandesio/32/71_2.png) [@matteofiandesio](https://community.seqera.io/u/matteofiandesio)\
**Post date:** [January 26, 2024, 8:31am UTC](https://community.seqera.io/t/aws-batch-cannot-determine-region-of-bucket/431/4 "2024-01-26T08:31:01Z")

</div>

@shasha Can you test if the credentials have proper access to the bucket by using the s3 cli? It could be a credential problem.  
When you start filling the form of the CE creation does the bucket appear in the autocomplete list?

---

<div class="post-metadata">

**Author:** ![shasha](https://dub1.discourse-cdn.com/flex013/user_avatar/community.seqera.io/shasha/32/446_2.png) [@shasha](https://community.seqera.io/u/shasha)\
**Post date:** [January 30, 2024, 9:04pm UTC](https://community.seqera.io/t/aws-batch-cannot-determine-region-of-bucket/431/5 "2024-01-30T21:04:47Z")

</div>

@matteofiandesio @mribeirodantas thanks for your comments and hints.  
I added this extra inline policy to the IAM user and this fixed the issue.  
It works now.  
I hope this helps someone else.

```auto
{
	"Version": "2012-10-17",
	"Statement": [
		{
			"Sid": "TowerLaunch0",
			"Effect": "Allow",
			"Action": [
				"ssm:GetParameters",
				"s3:Get*",
				"s3:List*",
				"batch:DescribeJobQueues",
				"batch:CancelJob",
				"batch:SubmitJob",
				"batch:ListJobs",
				"batch:TagResource",
				"batch:DescribeComputeEnvironments",
				"batch:TerminateJob",
				"batch:DescribeJobs",
				"batch:RegisterJobDefinition",
				"batch:DescribeJobDefinitions",
				"ecs:DescribeTasks",
				"ec2:DescribeInstances",
				"ec2:DescribeInstanceTypes",
				"ec2:DescribeInstanceAttribute",
				"ecs:DescribeContainerInstances",
				"ec2:DescribeInstanceStatus",
				"ec2:DescribeImages",
				"logs:Describe*",
				"logs:Get*",
				"logs:List*",
				"logs:StartQuery",
				"logs:StopQuery",
				"logs:TestMetricFilter",
				"logs:FilterLogEvents",
				"ses:SendRawEmail"
			],
			"Resource": "*"
		}
	]
}

```
