添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
干练的水桶  ·  boost/beast/websocket/ ...·  6 月前    · 
潇洒的凉茶  ·  斗罗同人吧_百度贴吧·  1 年前    · 
愉快的电池  ·  Makefile - remove ../ ...·  1 年前    · 

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement . We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account
provider "aws" {
  shared_credentials_file = "~/.aws/credentials"
  region                  = "${var.base["region"]}"
terraform {
  backend "s3" {
    bucket = "mybucket"
    key    = "backend/state"
    region = "us-east-1"
    encrypt = true
    shared_credentials_file = "~/.aws/credentials"

Debug Output

Crash Output

oerp@oerp:~/src/timefordev-ias$ terraform init
Initializing the backend...
Successfully configured the backend "s3"! Terraform will automatically
use this backend unless the backend configuration changes.
Error loading state: AccessDenied: Access Denied
	status code: 403, request id: somerequestid, host id: someid

Also tried with profile. Same thing.

And when try this:

oerp@oerp:~/src/timefordev-ias$ terraform workspace list
AccessDenied: Access Denied
	status code: 403, request id: aaaa, host id: bbb

Expected Behavior

Actual Behavior

Steps to Reproduce

Additional Context

User that is trying to access S3, have these policies set:

AmazondRDSFullAccess
AmazondEC2FullAccess
AmazondS3FullAccess

I also tried adding AdministratorAccess, but it did not change anything.

References

#13589

I am encountering this same issue exception I am using default profile without a shared credentials file.

REDACTED

Initializing the backend...
Backend configuration changed!

Terraform has detected that the configuration specified for the backend
has changed. Terraform will now check for existing state in the backends.

Error inspecting states in the "s3" backend:
AccessDenied: Access Denied
status code: 403, request id: REDACTED

Prior to changing backends, Terraform inspects the source and destination
states to determine what kind of migration steps need to be taken, if any.
Terraform failed to load the states. The data in both the source and the
destination remain unmodified. Please resolve the above error and try again.

@oerp-odoo if you have aws credentials set as environment variables, those will override whatever you is set in your terraform configuration (including the credentials file) - is that what you meant?

Another common confusion I've seen is when the AWS credentials used for the backend (the s3 bucket) are not be the same credentials used for the AWS provider.