Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

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

s3.CopyObject - Error occurred: NotImplemented: A header you provided implies functionality that is not implemented - ERROR 501 #1379

Closed
amongil opened this issue Jun 29, 2017 · 2 comments
Labels
guidance Question that needs advice or information.

Comments

@amongil
Copy link

amongil commented Jun 29, 2017

Version of AWS SDK for Go?

1.6.2

Version of Go (go version)?

1.8.3

What issue did you see?

s3.CopyObject() request to an object in a bucket returns Status Code 501 (NotImplemented: A header you provided implies functionality that is not implemented).

Steps to reproduce

Create a session

sess := session.Must(session.NewSessionWithOptions(session.Options{
		SharedConfigState: session.SharedConfigEnable,
	}))

Create a service client (tried more regions than eu-central-1, error persists)

svc := s3.New(sess, &aws.Config{
		Credentials: stscreds.NewCredentials(sess, roleArn),
		Region:      aws.String("eu-central-1"),
	})

Then list buckets, list objects and finally..

Copy object

input := &s3.CopyObjectInput{
		Bucket:               &b,
		CopySource:           &cpSrc,
		Key:                  &k,
		ServerSideEncryption: &encr,
	}
_, err := svc.CopyObject(input)
	if aerr, ok := err.(awserr.Error); ok {
		return aerr
	}
	return err

The error I get:

Error occurred: NotImplemented: A header you provided implies functionality that is not implemented
	status code: 501, request id:

And the headers that get sent are:

X-Amz-Security-Token: [token]

X-Amz-Date: [20170629T085416Z]

X-Amz-Content-Sha256: [hash]

Authorization: [AWS4-HMAC-SHA256 Credential=ASIAI2UG5TXMLGP7AHAQ/20170629/eu-central-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-copy-source;x-amz-date;x-amz-security-token;x-amz-server-side-encryption, Signature=somehash]

User-Agent: [aws-sdk-go/1.6.2 (go1.8.3; darwin; amd64)]

X-Amz-Copy-Source: [vwfs-du-concourse-worker-bootstrap/helloworld.html]

X-Amz-Server-Side-Encryption: [AES256]

@amongil amongil changed the title Error occurred: NotImplemented: A header you provided implies functionality that is not implemented - ERROR 501 s3.CopyObject - Error occurred: NotImplemented: A header you provided implies functionality that is not implemented - ERROR 501 Jun 29, 2017
@xibz
Copy link
Contributor

xibz commented Jun 29, 2017

Hello @amongil, thank you for reaching out to us. This is a known issue with the service using 1.6.2 of the SDK or earlier. You just need to update your SDK and things should work! Please let us know if you have any additional issues

@xibz xibz added the guidance Question that needs advice or information. label Jun 29, 2017
@amongil
Copy link
Author

amongil commented Jun 30, 2017

Thanks very much. I should've known better ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
guidance Question that needs advice or information.
Projects
None yet
Development

No branches or pull requests

2 participants