Skip to content

Upcoming AWS change in ARN format breaks emp ps #1156

@tyrken

Description

@tyrken

AWS have long had an option to use a new format for ECS arns for services, tasks and container-instances, see https://aws.amazon.com/blogs/compute/migrating-your-amazon-ecs-deployment-to-the-new-arn-and-resource-id-format-2/
What's new is that from October 2020 these options default to on for new accounts, and April 2021 they become mandatory for all accounts. So from that latter date our existing empire controllers will see a mix of old & newer formats.

I've tested this by making a new account with the options turned on and it mostly works. The only fault I've found so far is that emp ps breaks, giving a "invalid ARN resource" error, likely from

empire/pkg/arn/arn.go

Lines 63 to 77 in 7ab6b86

// SplitResource splits the Resource section of an ARN into its type and id
// components.
func SplitResource(r string) (resource, id string, err error) {
p := strings.Split(r, "/")
if len(p) != 2 {
err = ErrInvalidResource
return
}
resource = p[0]
id = p[1]
return
}

Anybody else come across this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions