Questions tagged [amazon-policy]

Amazon policy - is a document that formally states one or more permissions.

To assign permissions to a user, group, role, or resource, you create a policy, which is a document that explicitly lists permissions. In its most basic sense, a policy lets you specify the following:

Actions: what actions you will allow. Each AWS service has its own set of actions. For example, you might allow a user to use the Amazon S3 ListBucket action, which returns information about the items in a bucket. Any actions that you don't explicitly allow are denied.

Resources: which resources you allow the action on. For example, what specific Amazon S3 buckets will you allow the user to perform the ListBucket action on? Users cannot access any resources that you have not explicitly granted permissions to.

Effect: what the effect will be when the user requests access—either allow or deny. Because the default is that resources are denied to users, you typically specify that you will allow users access to resource.

For more see here

86 questions
3
votes
0 answers

Amazon cognito + S3 policy - not working identity sub variable

i am working with Amazon cognito and S3. I want to achieve that each user will have "own" directory in S3 (tutorial example). So i have setup following policy (following this example…
3
votes
1 answer

S3 Bucket Policy - GET Implicitly Allowed

When using the following bucket policy, I see that it restricts PUT access as expected - however GET is allowed on the created object, even though there is nothing which should allow this operation. { "Version": "2012-10-17", "Statement": [ …
unclemeat
  • 5,029
  • 5
  • 28
  • 52
3
votes
1 answer

Roles policy to access separate ARN resource issue

I want to add policy that allow access IAM User only to few of the tables. Follow this document My policy: { "Version": "2012-10-17", "Statement": [ { "Action": [ "cloudwatch:DescribeAlarmHistory", …
hbk
  • 10,908
  • 11
  • 91
  • 124
2
votes
0 answers

How do I allow Cognito users access to private content on my AWS static S3 bucket?

I have spent weeks going in circles over this. I have a static S3 website with several 'folders'. I would like to allow public access to the 'root' and 'public' (css, javascript, etc.) folders, but want to restrict access to a 'user' folder. I set…
2
votes
1 answer

When is the EFS policy condition elasticfilesystem:AccessedViaMountTarget false? Can an EFS volume be accessed without a mount target?

I've been looking into EFS file system policies, and still haven't understood what kind of access would be blocked in this policy: { "Version": "2012-10-17", "Id": "efs-policy-wizard-15ad9567-2546-4bbb-8168-5541b6fc0e55", "Statement": [ …
Leonardo Dagnino
  • 2,914
  • 7
  • 28
2
votes
2 answers

Restrict access for some users to operate only on Amazon SES and not other services

How do I restrict access for some users to operate only on SES and not other services on my AWS account? Exemple: { "Version": "2021-12-16", "Statement": [ { "Sid": "AllowsSES", "Effect": "Allow", …
2
votes
2 answers

Is using tag values to control access to a resource possible?

In an attempt to give an instance access to a specific folder in an s3 bucket, I've got this in a policy: "Resource": "arn:aws:s3:::My_Bucket/db_backups/${aws:ResourceTag/Name}/*" It doesn't work. Documentation for using tags like this is here:…
StevieD
  • 6,925
  • 2
  • 25
  • 45
2
votes
0 answers

S3 to store only objects encrypted by one default KMS key and restrict all others

I am trying to upload object to s3 bucket, encrypted with ONLY a specific KMS key. I have created a policy with separate deny conditions, but it does not seem to work. Can somebody suggest where could I be going wrong? I tested this policy with AWS…
2
votes
2 answers

Getting error: "Has prohibited field Principal", when creating policy

I want to create a policy to allow everyone to read my S3 bucket, this is the policy that I have created (I am following this guide): { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ …
Hooman Bahreini
  • 14,480
  • 11
  • 70
  • 137
2
votes
1 answer

Deny creation of new resources via Service Control Policy

Is it possible to create such a SCP (Service Control Policy) and attach it to account which denies any new resources (infrastructure) launching within this account? Assuming that the account is part of AWS Organizations. The question arises from the…
Andremoniy
  • 34,031
  • 20
  • 135
  • 241
2
votes
0 answers

Can't set S3 policy for HEAD operations (403 - Forbidden)

I'm using Django with the django-storages library to upload my model's files to S3 and need to add a policy to block direct downloading from the bucket's URLs. I have achieved that by setting the policy below (check the Referer) but this resulted in…
Ícaro
  • 1,432
  • 3
  • 18
  • 36
2
votes
2 answers

s3 Bucket Policies Access Denied

I am trying to upload an object on s3 from aws-sdk-js, but cannot figure out policies for my case. I want to allow only one user to have upload access and a public read access. Here are my s3 bucket policies { "Version": "2012-10-17", …
Farhan Salam
  • 1,257
  • 11
  • 16
2
votes
5 answers

Grant EC2 instance access to S3 Bucket

I want to grant my ec2 instance access to an s3 bucket. On this ec2 instance, a container with my application is launched. Now I don't get permission on the s3 bucket. This is my bucket policy { "Version": "2012-10-17", "Id":…
DK1990
  • 438
  • 2
  • 8
  • 21
1
vote
0 answers

Cross-account Route 53 editing using IAM Identity Center permissions

I'm trying to make changes to a Route 53 zone in one account (Account A), from a different AWS account (yep – Account B). The two accounts are in the same Organisation. We use IAM Identity Center to sign in (so not vanilla IAM). I have edited the…
mattcooney
  • 78
  • 5
1
vote
1 answer

Unable to restric IAM Role to a specific key and subkeys in S3 (getting AccessDenied)

I have 2 IAM Roles A & B that are assumed by 2 EC2 instances. I would like to grand role A access to ServerA/ key and all subkeys and objects in a S3 bucket. I would like to to the same for Role B but give it access to only ServerB/ key and all…
Georgi Koemdzhiev
  • 11,421
  • 18
  • 62
  • 126